karthikeyan v


{ City } hyd
< Country > india
* Profession * student
User No # 69956
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 # 0
Questions / { karthikeyan v }
Questions Answers Category Views Company eMail




Answers / { karthikeyan v }

Question { HCL, 6979 }

main()

{

int x=5;

clrscr();

for(;x==0;x--) {

printf("x=%d\n”", x--);

}

}

a. 4, 3, 2, 1, 0

b. 1, 2, 3, 4, 5

c. 0, 1, 2, 3, 4

d. none of the above


Answer

d:None of the above
Explanation:
In for loop the condition x==0,i.e;x0 is assigned to
zero.which means x value will be 0 not the 5.so it causes error.

Is This Answer Correct ?    1 Yes 0 No