20. main()
{
int i=5;
printf("%d%d%d%d%d%d",i++,i--,++i,--i,i);
}
Answer:??????
Answers were Sorted based on User's Feedback
Answer / ashish
The only concept here is that the printf starts 'generating'
results from RHS to LHS.
Hence, in the process of generation: i=5; then --i=4; ++i=5;
i--=5(due to the postfix concept, but after finishing this
calculation i=4); now i++=4(after performing i++, the value
of 'i' is 5, but for printing, due to the postfix concept,
i=4, the current value of 'i' will be printed).
The printing happens in order from LHS to RHS. Hence these
values are printed as 4 5 5 4 5.
| Is This Answer Correct ? | 5 Yes | 1 No |
Define recursion in c.
What is int main () in c?
How to reverse alternate words in a given line of string For Eg: my name is narasimha output : my eman is ahmisaran
#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} what would be the output?
int i =10 main() { int i =20,n; for(n=0;n<=i;) { int i=10 i++; } printf("%d", i);
In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?
in one file global variable int i; is declared as static. In another file it is extern int i=100; Is this valid ?
whenever a question is posted in a particular category in allinterview.com, Is there any facility to receive an indication mail. For eg: I need to receive an indication email, whenever a question is posted under the category “C Langauage”.
please give me answer with details #include<stdio.h> main() { int i=1; i=(++i)*(++i)*(++i); printf("%d",i); getch(); }
What is the best way to store flag values in a program?
What the different types of arrays in c?
get any number as input except 1 and the output will be 1.without using operators,expressions,array,structure.don't print 1 in printf statement