...
UGC NET CS 2013 June-paper-2
May 20, 2024
Question 5614 – UGC NET CS 2013 June-paper-2
May 20, 2024
UGC NET CS 2013 June-paper-2
May 20, 2024
Question 5614 – UGC NET CS 2013 June-paper-2
May 20, 2024

UGC NET CS 2013 June-paper-2

Question 6
When the following code is executed what will be the value of x and y ?
int x = 1, y = 0;
     y = x++;
A
2,1
B
2,2
C
1,1
D
1,2
Question 6 Explanation: 
Given post increment for x value. In post increment the value assign first and update after assigning.
So, x=2 and y=1
Correct Answer: A
Question 6 Explanation: 
Given post increment for x value. In post increment the value assign first and update after assigning.
So, x=2 and y=1
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x