
HackTrail
Quiz
•
Computers
•
University
•
Hard
Dheeraj Vishwakarma
Used 2+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following C code?
#include <stdio.h>
int main() {
int arr[] = {1, 3, 5, 7, 9};
int *p = arr;
printf("%d", *(p + 3));
return 0;
}
1
5
7
9
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of this recursive function in Python?
def func(n):
if n == 0:
return 0
return n + func(n - 1)
print(func(5))
Infinite recursion
5
10
15
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of this Python code?
def dfs(graph, v, visited=set()):
visited.add(v)
for neighbor in graph[v]:
if neighbor not in visited:
dfs(graph, neighbor, visited)
return visited
graph = {'A': ['B'], 'B': ['C'], 'C': ['A']}
print(dfs(graph, 'A'))
Error
{'A'}
{'A', 'C'}
{'A', 'B', 'C'}
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Time complexity of the following C function?
void fun(int n) {
for (int i = 1; i <= n; i *= 2)
printf("%d ", i);
}
O(n)
O(log n)
O(n log n)
O(1)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Output of the Python code:
a = [1, 2, 3]
b = a
b.append(4)
print(a)
[1, 2, 3]
[1, 2, 3, 4]
[1, 2, 4]
Error
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which queue implementation allows insertion and deletion at both ends?
LinkedList
Queue
PriorityQueue
Dequeue
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following C code print?
char str[] = "HackTrail";
printf("%c", *(str + 4));
T
r
a
k
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
12 questions
Porcentajes
Quiz
•
University
10 questions
Web-II-Loop and Function
Quiz
•
University
20 questions
โครงการเพิ่มศักยภาพโปรแกรม Microsoft Power point
Quiz
•
University
10 questions
Algorithm analysis: divide & conquer theory
Quiz
•
University
10 questions
VB Quiz
Quiz
•
5th Grade - University
10 questions
Bài tập biểu mẫu
Quiz
•
University
10 questions
Soal SKD
Quiz
•
University - Professi...
18 questions
PBO Inheritance Episode 2
Quiz
•
University
Popular Resources on Wayground
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
20 questions
MINERS Core Values Quiz
Quiz
•
8th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
20 questions
Multiplying and Dividing Integers
Quiz
•
7th Grade
10 questions
How to Email your Teacher
Quiz
•
Professional Development
15 questions
Order of Operations
Quiz
•
5th Grade
Discover more resources for Computers
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
7 questions
Central Idea of Informational Text
Interactive video
•
4th Grade - University
20 questions
Physical or Chemical Change/Phases
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
39 questions
Unit 7 Key Terms
Quiz
•
11th Grade - University
7 questions
Transition Words and Phrases
Interactive video
•
4th Grade - University
18 questions
Plotting Points on the Coordinate Plane
Quiz
•
KG - University
5 questions
Declaration of Independence
Interactive video
•
4th Grade - University
