main()
{
int x=10,y=15;
x=x++;
y=++y;
printf("%d %d\n",x,y);
}
output??
Answer Posted / shruti
the ans is 11 and 16..
y = ++y;
wont make any differance as a statement.
we will have to think about it only if we are using it in
loops.. or conditional statements etc.. :-)
so dont get confused.
dont forget ur basics..
C is a procedural language.
hence
x = x++;
will be completely executed first
the value of x = 11.
and then
y = ++y;
will be executed and value will be changed to 16
| Is This Answer Correct ? | 11 Yes | 11 No |
Post New Answer View All Answers
Explain how are portions of a program disabled in demo versions?
What 'lex' does?
find the value of y y = 1.5x+3 for x<=2 y = 2x+5 for x>2
What is wrong with this declaration?
What are the 4 types of unions?
Which of the following operators is incorrect and why? ( >=, <=, <>, ==)
the number of measuring units from a arbitrary starting point in a record area or control block to some other point a) branching b) recording pointer c) none d) offset
What is bash c?
Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?
Can you please compare array with pointer?
What are keywords c?
Explain how do you print an address?
What is this pointer in c plus plus?
What is the value of c?
What is the meaning of typedef struct in c?