What is the output of the following program?

C and Java Programming Quiz

Quiz
•
Computers
•
University
•
Hard
Gagan S K
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
30 10
30 20
20 10
40 20
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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
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
What will the following code output?
10
20
Compile-time error
Runtime error
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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
Similar Resources on Quizizz
10 questions
Q4 - Comp Vision

Quiz
•
University
10 questions
Java Strings

Quiz
•
1st Grade - Professio...
10 questions
OBJECT ORIENTED PROGRAMMING WITH JAVA

Quiz
•
University
10 questions
Object/Abstract/Final in JAVA

Quiz
•
University
10 questions
Inheritance

Quiz
•
University
10 questions
Pewarisan (Inheritance) in JAVA

Quiz
•
University
6 questions
Polymorphism

Quiz
•
University
10 questions
DEBUG THE CODE

Quiz
•
University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade