0% found this document useful (1 vote)
638 views

RSL MCQ Test

The document contains a 20 question multiple choice programming quiz. The questions cover topics like loops, arrays, strings and time complexity. The questions ask about the output of code snippets or values to replace in code to produce an expected output.

Uploaded by

rachikachore2001
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
638 views

RSL MCQ Test

The document contains a 20 question multiple choice programming quiz. The questions cover topics like loops, arrays, strings and time complexity. The questions ask about the output of code snippets or values to replace in code to produce an expected output.

Uploaded by

rachikachore2001
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

RSL MCQ Test

[email protected] Switch account

Draft saved

Programming MCQs

- There are 20 questions in this test.


- Please try and answer all the questions.
- All questions have equal weightage.
- The total duration for this test is 30 min.
Please submit the form in time.

What output will this method produce if


the given input array is {0,0,1,1,1,2,2,3,3,4}?

Clear selection

What output will this code produce with


given input?

Raja Software Raja Software

Raja

Exit

Raja Raja Software

Clear selection

How many times will the print statement


be executed?

Clear selection

What output will be printed?

13

12

Clear selection

What will be the output of the below


program?

Will print 1 to 10

Will print 1 to 10 and crash

Will print 2 to 10

Will print 2 to 10 and crash

Clear selection

Assuming x is initialised to 1, how many


times will the following loop be executed?

59

60

61

InMnite

Clear selection

What will be the output of the following


program?

12335578

12244668

87654321

122344566

What will be the output of the following


program?

A1d2r1e1s3e1

A1d2d1r1e2s3s2e1s1

A1d1d1r1e1s1s1e1s1

None of the above

What will be the output of the following


program?

22

24

14

13

What will be the output of the following


program?

23

17

5168

What will be the output of the following


statements?

3 6 9 12

6 9 12 15

3 7 11

3 7 11 15

What values should be replaced in place


of <x>, <y> and <z> to get the expected
output?

<x>: i<3, <y>: j=0, <z>: j<=3*3

<x>: i<=3, <y>: j=1, <z>: j<=3*i

<x>: i<9, <y>: j=i, <z>: j<=3

<x>: i<3, <y>: j=0, <z>: j<3*i

Clear selection

What values should be replaced in place


of <p>, <q>, <r>, <s>, <t>, <u> and <v> to
get the expected output?

<p>: i=0, <q>: j=i, <r>: j<=1, <s>: i>=0, <t>:


i--, <u>: j=1, <v>: j<=i

<p>: i=1, <q>: j=0, <r>: j<=i, <s>: i>=0, <t>:


i++, <u>: j=0, <v>: j<=1

<p>: i=0, <q>: j=1, <r>: j<=1, <s>: i>=1,


<t>: i--, <u>: j=1, <v>: j<=1

<p>: i=1, <q>: j=1, <r>: j<=i, <s>: i>=1, <t>:


i--, <u>: j=1, <v>: j<=i

Clear selection

Choose the correct code form

If Q=18, QON = 49, then what does FONTS


equal to?

75

79

77

78

Read the following information carefully


and answer the question below.

- Terminator walked 40 m towards north


and killed a terrorist.

- Then he silently turned right and walked


60 m.

- Then he turned right, walked 70 m and


again he turned left, walked 30 m.

- Finally, he turns left and walks 30 m.

In which direction and how far is he from


the starting position?

90 m East

60 m West

30 m South

80 m North

Clear selection

What will be the output of the following


program?

S1a1k2e1t2

k2t2

Sakkett

Sak

Clear selection

What output will this method produce if


the given input array is {2,2,1,1,1,2,2,1,2,1}

publicinttestFunction(int[]nums)l
intfinalCount=nums.length/2;
for(intnum:nums){
intcount=0;
for(intelem:nums){
if(elem==num){
count+=1;

if(count>finalCount){
returnnum;

return-1;

-1

What values should be replaced in place


of <p>, <q> and <r> to get expected
output?

<p>: i=3, <q>: i<=maxLimit, <r>:


j<maxLimit

<p>: i=0, <q>: i<=maxLimit-1, <r>: j<i

<p>: i=2, <q>: i<=maxLimit, <r>: j<i

<p>: i=1, <q>: i<=maxLimit-1, <r>: j<1

What is the Big O time complexity of the


following?

for(var1=0;i<n;i++){
for(varj=0;j<m;j++){

O(n)

O(m)

O(nm)

O(n+m)

Choose the image that completes the


pattern:

Clear selection

Back Submit Clear form

Never submit passwords through Google Forms.

This form was created inside of joinrsl.com. Report Abuse

Forms

You might also like