HiTech Quiz 6

HiTech Quiz 6

Professional Development

22 Qs

quiz-placeholder

Similar activities

Menus, Dialog Boxes and Methods

Menus, Dialog Boxes and Methods

10th Grade - Professional Development

17 Qs

Week 1 Test

Week 1 Test

Professional Development

19 Qs

SUMATIF RPL

SUMATIF RPL

Professional Development

20 Qs

msp quiz

msp quiz

University - Professional Development

23 Qs

PSPC1

PSPC1

Professional Development

20 Qs

increment and decrement

increment and decrement

Professional Development

20 Qs

Quiz on switch_for_while_dowhile

Quiz on switch_for_while_dowhile

Professional Development

20 Qs

Introduction to .NET Core

Introduction to .NET Core

Professional Development

20 Qs

HiTech Quiz 6

HiTech Quiz 6

Assessment

Quiz

Computers

Professional Development

Medium

Created by

Venkatesh iGen

Used 1+ times

FREE Resource

22 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

What is the output of this program?

0

1

120

None of the above

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why would you use a base case?

So that the code loops forever

So that the code does not loop forever

Because coding

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of this program?

2

3

4

ArrayIndexOutOfBoundsException

4.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

static void print(int x){

if(x==0) {

return;

}

System.out.print(x%2);

print(x/2);

}

What will be the output of the above code segment if the print() method is called with the parameter 9?

001

100

1001

101

1110

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Consider the following code segment.


String one = "ABC123";

String two = "C";

String three = "3";

System.out.println(one.indexOf(two));

System.out.println(one.indexOf(three));

System.out.println(two.indexOf(one));


What is printed when the code segment is executed?

2

5

-1

2

5

2

2

6

-1

3

6

-1

-1

-1

2

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Name the condition at which the recursive method will stop calling itself.

Base case

Worst Case

Best Case

None of the above

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following condition is true?

Recursion is always better than iteration.

Recursion uses more memory as compared to iteration.

Recursion uses less memory as compared to iteration.

Iteration is always better and simpler than recursion.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?