main()
{
int x=5;
for(;x!=0;x--) {
printf("x=%d\n", x--);
}
}
a. 5, 4, 3, 2,1
b. 4, 3, 2, 1, 0
c. 5, 3, 1
d. none of the above
Answers were Sorted based on User's Feedback
Answer / guest
d) Infinite loop as x is decremented twice, it never be 0
and loop is going on & on
| Is This Answer Correct ? | 13 Yes | 0 No |
Answer / ajit
first error in 4 step as syntax error
this is so that for(x!=0;x--) answer is d becoze here
not defined x=?
| Is This Answer Correct ? | 0 Yes | 10 No |
main() { int a=10,*j; void *k; j=k=&a; j++; k++; printf("\n %u %u ",j,k); }
#define f(g,g2) g##g2 main() { int var12=100; printf("%d",f(var,12)); }
What is the problem with the following code segment? while ((fgets(receiving array,50,file_ptr)) != EOF) ;
main() { int i=5,j=6,z; printf("%d",i+++j); }
main() { int i=10,j=20; j = i, j?(i,j)?i:j:j; printf("%d %d",i,j); }
How will u find whether a linked list has a loop or not?
main() { unsigned int i=65000; while(i++!=0); printf("%d",i); }
What are the files which are automatically opened when a C file is executed?
What is full form of PEPSI
int main() { int x=10; printf("x=%d, count of earlier print=%d", x,printf("x=%d, y=%d",x,--x)); getch(); } ================================================== returns error>> ld returned 1 exit status =================================================== Does it have something to do with printf() inside another printf().
main() { int i; printf("%d",scanf("%d",&i)); // value 10 is given as input here }
How to swap two variables, without using third variable ?
104 Answers AB, ADP, BirlaSoft, Cisco, Cygnet Infotech, HCL, Hewitt, Honeywell, HP, IBM, Infosys, Manhattan, Microsoft, Mobius, Percept, Satyam, SofTMware, TCS, Wipro, Yamaha,