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 |
main() { int i=0; while(+(+i--)!=0) i-=i++; printf("%d",i); }
What do you mean by a local block?
all c language question
What are the 4 data types?
can anyone proide me reading material on svit00ef27@yahoo.com please thanx in advance
read the folllowing code # define MAX 100 # define MIN 100 .... .... if(x>MAX) x=1; else if(x<MIN) x=-1; x=50; if the initial value of x=200,what is the vlaue after executing this code? a.200 b.1 c.-1 d.50
Explain the priority queues?
What is the Purpose of 'extern' keyword in a function declaration?
what is the maximum limit of row and column of a matrix in c programming. in linux .
How to add two numbers with using function?
How can I convert integers to binary or hexadecimal?
How can I make a program in c to print 'Hello' without using semicolon in the code?
9 Answers C DAC, Practical Viva Questions,