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


Please Help Members By Posting Answers For Below Questions

What is the difference between functions getch() and getche()?

624


Can you please explain the difference between syntax vs logical error?

698


Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.

1769


What is the correct code to have following output in c using nested for loop?

613


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

588






What is the difference between array and pointer?

570


How to declare a variable?

573


What is selection sort in c?

611


Why isnt there a numbered, multi-level break statement to break out

590


What is abstract data structure in c?

532


Dont ansi function prototypes render lint obsolete?

607


Once I have used freopen, how can I get the original stdout (or stdin) back?

629


Why does not c have an exponentiation operator?

629


What is operator precedence?

645


Give the rules for variable declaration?

679