jaguar


{ City } bangalore
< Country > india
* Profession *
User No # 58705
Total Questions Posted # 0
Total Answers Posted # 1

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 1
Users Marked my Answers as Wrong # 4
Questions / { jaguar }
Questions Answers Category Views Company eMail




Answers / { jaguar }

Question { 4925 }

Sir,please help me out with the output of this programme:-

#include
#include
void main()
{
int a=18,b=12,i;
for(i=a printf("%d %d",i);
}


Answer

Check how loop runs


At start of the loop for (I = 12; (18 % 12 || 12 % 12); i--)


1 ieteration  (6 || 0) and i = 11
1 ieteration  (7 || 1) and i = 10
1 ieteration  (0 || 3) and i = 9
1 ieteration  ( 2|| 4) and i = 8
1 ieteration  (4 || 5) and i = 7
1 ieteration  (0 || 0) and i = 6 Loop comes out then the
value of I prited is 6

Is This Answer Correct ?    1 Yes 4 No