Search Header Logo

Java and C Programming Quiz

Authored by DHURGATHARAN R

Other

University

Java and C Programming Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The concept of multiple inheritance is implemented in java by

(ii) and (iii)

only (ii)

(i) and (ii)

only (iii)

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following code print? x = "hello" y = x.replace('l', 'L') print(y)

hello

Error

heLlo

heLlo

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following methods is used to set the size of a component?

setMinimumSize()

setSize()

setPreferredSize()

setBounds()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following operators cannot be overloaded?

?:

Both B and C

>>

.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following C program #include int main () { int shifty; shifty = 0273; shifty = shifty >>4; shifty = shifty <<6; printf("the value of shifty is %o",shifty); return 0; }

the value of shifty is 2600

the value of shifty is 5447

the value of shifty is 0273

the value of shifty is 1300

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What do you call this button?

Find Button

Error Button

Debugging Button

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Code with error: public class Main { public static void main(String[] args) { Integer num1 = 127; Integer num2 = 127; System.out.println(num1 == num2); } }

Initialize num1 with Integer.valueOf(127)

Use System.out.println(num1 != num2);

Use num1.equals(num2)

Change Integer to int

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?