Skip to main content

4.What is variable?

A variable is an entity whose value can change during program execution.A variable is symbolic representation of address of the memory stress were values can be stored,excesed and changed.

Each variable has a name and datatype.All variable must have their type indicated,so that the compiler can record all the necessary information about them,generate appropriate code during allocating required space in memory.

# Rules for construction variable name:-
1 It should be a combination of alphabet,digits or under score.
2 First character must be an alphabet
3 Variable name should not be matching with reserve word in c

Example:- Employ - name
                        "            age
                    Item- 4 etc

➡ A variable declaration in c is done as-type specified,separed list of separable
 Ex- int,I,g,k
         

Comments

Post a Comment

Popular posts from this blog

React Js interview questions

 

What is Increament or decrement operator?

They are (++) increment operator in c. (--)decrement operator in c. These two operators are called unary operator as they require only one operand.The operand should be a variable not a constant. * (++) operator :- Add one to the value of operand. *(--) operator :- substract one to the value of operand. # These operators are used in two form 1 pastfix form 2 prefix form          

Digital computer v/s Analog computer

Analog computer don't have ability of digital computer to store data in large quantities,nor do they have the comprehensive logical facilities afforded by programming digital machine.although the arithmetic function perform by the computing unit are more complex in analogue machine than in digital system. Analog machine are design for specific applications but most electrical and electronic analog computer provide a number of different computing devices which can be connected together via plug board or provide different methods of operations for special problem. In digital machine number to be stored to be used in same calculations were represented by physical quantities such as electrical voltage.