what is the output for this question:
main()
{
int i=1;
printf("%d%d%d",i,i++,++i);
}
Answer Posted / sumalatha
Ans is 2 2 2
because in printf assosiativity is from left to right
first pre increments i that becomes 2 next post increment
is done after printf stmt so prints 2 again, then simple
print i i.e 2again
last post increnent which i becomes 3 but that is done
after printf stmt
| Is This Answer Correct ? | 1 Yes | 4 No |
Post New Answer View All Answers
Which built-in library function can be used to match a patter from the string?
Explain what standard functions are available to manipulate strings?
What is wrong with this declaration?
Why pointers are used in c?
What is the function of multilevel pointer in c?
write a program to generate address labels using structures?
Why static variable is used in c?
Explain what is a const pointer?
Why we use conio h in c?
Describe newline escape sequence with a sample program?
A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none
When is the “void” keyword used in a function?
What is array of pointers to string?
WRITE A PROGRAM TO MERGE TWO SORTED ARRAY USING MERGE SORT TECHNIQUE..
Can you please explain the difference between malloc() and calloc() function?