main()
{
int i = 1;
int num[] = {1,2,3,4};
num[i] = i++;
printf("%d", num[i]);
}
what will be the output?
}
Answer Posted / xyz
the answer will be 3 b'coz whatever the "num[i] = i++;"
this expression the output will be depend's on "i" and
at last i will be 2 and num[2]=3 which is the answer.
Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
What is the difference between functions getch() and getche()?
Can you please explain the difference between syntax vs logical error?
Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.
What is the correct code to have following output in c using nested for loop?
general for is %wd,f-d; in this system "w" means a) 'w' represent total width of digits b) 'w' represent width which includes the digits before,after decimal place and the decimal point c) 'w' represent width which includes the digits before only d) 'w' represent width after decimal place only
What is the difference between array and pointer?
How to declare a variable?
What is selection sort in c?
Why isnt there a numbered, multi-level break statement to break out
What is abstract data structure in c?
Dont ansi function prototypes render lint obsolete?
Once I have used freopen, how can I get the original stdout (or stdin) back?
Why does not c have an exponentiation operator?
What is operator precedence?
Give the rules for variable declaration?