...
OOPS
August 25, 2024
OOPS
August 25, 2024
OOPS
August 25, 2024
OOPS
August 25, 2024

JAVA

Question 33
Given the array of integers ‘array’ shown below :

What is the output of the following JAVA statements ?

int [ ] p = new int [10];

int [ ] q = new int [10];

for (int k = 0; k < 10; k ++)

       p[k] = array [k];

q = p;

p[4] = 20;

System.out.println (array [4] + “ : ” + q[4]);

A
20 : 20
B
18 : 18
C
18 : 20
D
20 : 18
Question 33 Explanation: 
Correct Answer: C
Question 33 Explanation: 
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!