Competitive programming - take the quiz

A vibrant illustration of a computer programmer surrounded by code snippets, algorithms, and data structures, with a focus on competitive programming concepts.

Competitive Programming Challenge

Test your skills with our Competitive Programming Quiz! This quiz consists of 23 carefully crafted questions designed to assess your knowledge in various programming concepts and algorithms.

Join us and see how well you fare against other programmers!

  • Multiple Choice Questions
  • Checkbox Options
  • For All Skill Levels
23 Questions6 MinutesCreated by CodingEagle57
What is the time complexity of a linear search algorithm?
O(n)
O(log n)
O(1)
O(n^2)
Which data structure uses First-In-First-Out (FIFO) ordering?
Queue
Stack
Heap
Tree
Which sorting algorithm has an average time complexity of O(n log n)?
Merge Sort
Bubble Sort
Insertion Sort
Selection Sort
What is the output of the following code snippet? Int x = 5; int y = x++ + ++x; printf("%d", y);
12
10
11
13
Which of the following is NOT a valid data type in C++?
String
Float
Boolean
Character
Integer
What is the output of the following code snippet? Int arr[] = {1, 2, 3, 4, 5}; printf("%d", *(arr+2));
3
2
4
5
Which of the following is NOT a valid loop control statement in C++?
For-each
For
While
Do-while
Break
What is the output of the following code snippet? Int x = 10; if (x > 5 && x < 15) { printf("Hello"); } else { printf("World"); }
Hello
World
Hello World
No output
Which of the following is NOT a valid complexity class?
O(n^3)
O(log n)
O(2^n)
O(1)
O(n!)
What is the output of the following code snippet? Int x = 5; int y = 2; printf("%d", x / y);
2
2.5
2.0
5
Which of the following is NOT a valid bitwise operator in C++?
&
|
^
~
<<
>>
What is the output of the following code snippet? Int x = 5; int y = 3; printf("%d", x % y);
2
1
0.6667
0
What is the output of the following code snippet? Int arr[] = {1, 2, 3, 4, 5}; printf("%d", sizeof(arr) / sizeof(arr[0]));
5
20
4
1
Which of the following is NOT a valid control structure in C++?
If-else
Switch-case
For
While
Do-while
Goto
What is the output of the following code snippet? Int x = 5; int y = 3; printf("%f", (float)x / y);
1.6667
1
1.0
2
Which of the following is NOT a valid complexity class for algorithms?
O(n^2)
O(log n)
O(2^n)
O(1)
O(n!)
O(n log n)
What is the output of the following code snippet? Int x = 5; int y = 2; printf("%d", x * y + x / y);
12
11
10
7
What is the output of the following code snippet? Int x = 10; int y = 5; printf("%d", x - y * 2);
0
10
-10
-5
Which of the following is NOT a valid data structure in competitive programming?
Stack
Heap
Graph
Queue
Tree
Array
What is the time complexity of a binary search algorithm?
O(log n)
O(n)
O(1)
O(n^2)
What is the output of the following code snippet? Int x = 7; int y = 3; printf("%d", x % y);
1
2
0.3333
0
What is the output of the following code snippet? Int arr[] = {1, 2, 3, 4, 5}; printf("%d", *(arr+3));
4
2
3
5
What is the output of the following code snippet? Int x = 8; int y = 3; printf("%d", x / y);
2
2.6667
2.0
3
{"name":"Competitive programming - take the quiz", "url":"https://www.supersurvey.com/QPREVIEW","txt":"Test your skills with our Competitive Programming Quiz! This quiz consists of 23 carefully crafted questions designed to assess your knowledge in various programming concepts and algorithms.Join us and see how well you fare against other programmers!Multiple Choice QuestionsCheckbox OptionsFor All Skill Levels","img":"https:/images/course1.png"}
Make your own Survey
- it's free to start.