2,808 views

2 Answers

Best answer
1 votes
1 votes

// postfix

b++; // returns b then increases b

// prefix

++b; // increases b then returns b

 

int x=1, y=0;

y=x++;returns y then increases x

 

Output:-x=2 , y=1

 

Hence,Option(A)2,1.

selected by
1 votes
1 votes
since it is post increment operator y=1 and x=2 hence option A  is correct . be careful not to choose D by mistake
Answer:

Related questions

3 votes
3 votes
1 answer
2
go_editor asked Jul 14, 2016
4,106 views
A virtual memory based memory management algorithm partially swaps out a process. This is an example ofshort term schedulinglong term schedulingmedium term schedulingmutu...
2 votes
2 votes
1 answer
3
2 votes
2 votes
3 answers
4