UGC/CBSE NET SOLVED QUESTION PAPERS.(Computer Science)
Wednesday, 27 May 2015
Q6,Paper 2,j13.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
Answer A.
Explanation.
Y=x++. Y is initialized with 1 and later x value is incremented with 1.
So Answer is A.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: only a member of this blog may post a comment.