void main()
{
int i=5;
printf("%d",i++ + ++i);
}
Answer Posted / alan
when ever a cout or a printf statement is used..the instruction is processed from right to left..
had this been the qn
int i=5;
printf("%d%d",i++ + ++i,i);
ans would be 125.
as i said earlier the processing takes from right to left..
so first ++i=6,
then i++=6;
therfore 6+6=12..
Is This Answer Correct ? | 16 Yes | 8 No |
Post New Answer View All Answers
What is #line?
What are pointers? What are different types of pointers?
Synonymous with pointer array a) character array b) ragged array c) multiple array d) none
Write a program to reverse a linked list in c.
What is keyword in c?
What is 1d array in c?
Differentiate between a for loop and a while loop? What are it uses?
What is pre-emptive data structure and explain it with example?
what are the program that using a two dimensional array that list the odd numbers and even numbers separately in a given 10 inputs values
a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f
Is it possible to initialize a variable at the time it was declared?
Why isnt there a numbered, multi-level break statement to break out
What is difference between scanf and gets?
Here is a good puzzle: how do you write a program which produces its own source code as output?
Can a function argument have default value?