The picture below describes three aspects of using a variabl
Solution
1)
A)This one describes the datatype of the varibles, datatType are int,float,char,short,long,double etc
B)This one describes the identifier/variable, which is sequence of symbols, which is representation of a memory block.
C)value, this is value of the variable, this value is stored in the memory block that is associated to the variable
2)
A)for loop: syntax is for(i=0;i<n;i++){}
for loop uses an iterative varaible, which is used in iterative process.
in for loop statement, first part is used to initialize the iterative variable,or other variables also.,second part contain the condition statement, if the condition statement is true then loop executed, otherwise terminated..,third part can be used to increment the iterative variable, loop can be terminated by break statement also..
and then the body of the loop. the statements in the body are executed,,until the condition is false
B)while loop: syntax while(i<n)
while loop also uses an iterative varaible, which is used in iterative process.
if contain the conditional statement,
if the condition statement is true then loop executed, otherwise terminated..,third part can be used to increment the iterative variable, loop can be terminated by break statement also..
and then the body of the loop. the statements in the body are executed,,until the condition is false
the incremental variable is incremented with in the body..
C)do while: syntax : do{}while(condition)
It is one difference with while loop, and except that everything is same..
in while loop first it checks the condition and then it moves to the body if condtion is true, but in do while, first it executes the body, then it checks for the condition..
