Void f(int i, int &k) {i = 1;k = 2; } Suppose that a main program has two integer variables x and y, which are given the value 0. Then the main program calls f(x,y); What are the values of x and y?

(A) Both x and y are still 0
(B) x is now 1, but y is still 0
(C) x is still 0, but y is now 2
(D) x is now 1, and y is now 2

»Important Links:

Latest Jobs in PakistanGovt Jobs in PakistanPrivate Jobs in Pakistan
NTS JobsPPSC JobsFPSC Jobs
Teaching JobsNADRA JobsBank Jobs
English McqsGeneral Knowledge McqsPak Studies Mcqs
Current Affairs McqsCurrent Affairs Mcqs PDFCurrent Affairs of Pakistan
Books PDFNotes PDFIslamic Studies Mcqs

Leave a Reply

Your email address will not be published. Required fields are marked *

error: Content is protected !!