how does the for loop work actually..suppose for the
following program how it ll work plz explain to me
for(i=5;i>=0;i--)
prinf(i--);
Answer Posted / rima
It will give compilatiin error "warning: passing argument 1
of âprintfâ makes pointer from integer without a cast",
because the syntax of printf is not right.
And it would have been printf("%d",i--);
Then correct answer is 531.
This is the correct answer rest all are wrong.[:)]
| Is This Answer Correct ? | 5 Yes | 2 No |
Post New Answer View All Answers
Which of the following operators is incorrect and why? ( >=, <=, <>, ==)
In a byte, what is the maximum decimal number that you can accommodate?
Which is best linux os?
Why is c called c not d or e?
Can you write a programmer for FACTORIAL using recursion?
Mention four important string handling functions in c languages .
Explain the bubble sort algorithm.
Write a program to check palindrome number in c programming?
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].
Compare array data type to pointer data type
Explain what is the purpose of "extern" keyword in a function declaration?
What is dangling pointer in c?
diff between exptected result and requirement?
The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?
how do you execute a c program in unix.