
Year-3

Quiz
•
Computers
•
University
•
Hard
THEJASRINI 23ADR178
FREE Resource
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
int arr[] = {1, 2, 3, 4, 5};
int *ptr = arr;
printf("%d", *(ptr + 3));
1
3
4
Compilation Error
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following code snippet do?
int x = 5;
int *ptr = &x;
(*ptr)++;
printf("%d", x);
Increments the value of x by 1
Decrements the value of x by 1
Gives an error
Does nothing
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which sorting algorithm has the worst-case time complexity of ?
Merge Sort
Quick Sort
Bubble Sort
Heap Sort
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
void function(int arr[], int n) {
for (int i = 0; i < n; i++) {
arr[i] += 5;
}
}
int main() {
int arr[] = {1, 2, 3};
function(arr, 3);
printf("%d", arr[1]);
return 0;
}
2
7
3
Compilation Error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is true about a struct in C?
Members of a struct are allocated contiguous memory by default.
Struct can contain only primitive types.
Struct members can be accessed using dot (.) and arrow (->) operators.
Struct can be used to implement inheritance.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax for defining a template class in C++?
template<class T>
class template<T>
template<class>
template(T)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not a valid feature in C++?
Friend Function
Operator Overloading
Multiple Inheritance
Garbage Collection
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
1st Year quiz

Quiz
•
University
20 questions
GirlsWhoML Workshop 0

Quiz
•
University
20 questions
Data Structures

Quiz
•
University
23 questions
C que que que

Quiz
•
University
20 questions
C - Strings

Quiz
•
University
30 questions
Code Twisters Round One Batch -1

Quiz
•
University
20 questions
1212 Midterm Review

Quiz
•
University
30 questions
CS 211 - Midterm Review

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University