C and Java Programming Quiz

C and Java Programming Quiz

University

10 Qs

quiz-placeholder

Similar activities

QUIZ PBO R5I

QUIZ PBO R5I

University

10 Qs

Unit 2 Inheritance in Java

Unit 2 Inheritance in Java

12th Grade - University

15 Qs

OOP - Java Classes

OOP - Java Classes

12th Grade - University

15 Qs

Java quiz based on inheritance

Java quiz based on inheritance

University

10 Qs

CS121 OOP

CS121 OOP

University

15 Qs

Quiz on OOPs- Day 1 (30-01-2025)

Quiz on OOPs- Day 1 (30-01-2025)

University

10 Qs

QUIZ PBO R5L

QUIZ PBO R5L

University

10 Qs

Object Oriented Programming

Object Oriented Programming

University

9 Qs

C and Java Programming Quiz

C and Java Programming Quiz

Assessment

Quiz

Computers

University

Hard

Created by

Gagan S K

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of the following program?

30 10

30 20

20 10

40 20

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is wrong with the following stack implementation?

Incorrect condition for stack overflow

Incorrect indexing for the stack

No error, the code works correctly

Stack is initialized incorrectly

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following data structures is best suited for finding the median in a stream of numbers?

Array

Doubly Linked List

Heap

Binary Search Tree

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Find the error in the following circular queue implementation:

Incorrect modulo operation

Overwriting of the first element during enqueue

Incorrect check for queue full

Logic for incrementing rear is incorrect

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The time complexity of deleting a node in a doubly linked list with n nodes, given a pointer to the node, is:

O(1)

O(n)

O(log n)

O(n log n)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will the following code output?

10

20

Compile-time error

Runtime error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the issue with the following Java snippet?

Misuse of this keyword

Incorrect variable declaration

No error

Incorrect access modifier for x

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?