UGC NET CS 2013 June-paper-2
May 20, 2024Question 5614 – UGC NET CS 2013 June-paper-2
May 20, 2024UGC 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++;
int x = 1, y = 0;
y = x++;
2,1 | |
2,2 | |
1,1 | |
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
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
So, x=2 and y=1
Subscribe
Login
0 Comments