
Data Structure Lab 1
Quiz
•
Information Technology (IT)
•
University
•
Practice Problem
•
Medium
Yasmin Kandil
Used 23+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the index of the first element in a C++ array?
1
0
-1
Depends on compiler
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If an array int arr[5]; is declared, what is the valid index range?
1 ->5
0 ->5
0 ->4
-1 ->4
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
int num = 5, *ptr = #
int num = 5, *ptr = #
ptr = ptr + 10;
cout << num;
5
10
15
error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following correctly declares a pointer to an integer?
int p;
int *p;
int &p;
pointer int p;
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the code:
int arr[3] = {1, 2, 3};
int *p = arr;
cout << *(p+2);
1
2
3
garbage value
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
After executing the code below, what are the values of x and y?
int x = 5, y = 10;
int p = &x, q = &y;
p = q;
x = 5, y = 10
x = 10, y = 10
x = 5, y = 5
x = 0, y = 0
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code output?
char ch = 'A'; // ASCII = 65
char ch = 'A'; // ASCII = 65
ch = ch + 2;
cout << ch;
A
B
C
65
67
Access all questions and much more by creating a free account
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
Already have an account?
Similar Resources on Wayground
15 questions
Python_MCQ_2
Quiz
•
University
10 questions
Deep learning Batch 1
Quiz
•
University
14 questions
ORM - Django
Quiz
•
University
15 questions
Eval. 3B Bloque 1
Quiz
•
9th Grade - University
14 questions
UML - Diagrama de Classes
Quiz
•
University
15 questions
P3 IAS 2 Quiz
Quiz
•
University
12 questions
Java_Quiz_Part_2
Quiz
•
University
15 questions
Emp. Tech. 12 - Intro to MS Excel Quiz
Quiz
•
12th Grade - University
Popular Resources on Wayground
8 questions
2 Step Word Problems
Quiz
•
KG - University
20 questions
Comparing Fractions
Quiz
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Latin Bases claus(clois,clos, clud, clus) and ped
Quiz
•
6th - 8th Grade
22 questions
fractions
Quiz
•
3rd Grade
7 questions
The Story of Books
Quiz
•
6th - 8th Grade
Discover more resources for Information Technology (IT)
8 questions
2 Step Word Problems
Quiz
•
KG - University
7 questions
Comparing Fractions
Interactive video
•
1st Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
10 questions
14.2 Independent/Dependent Variables
Quiz
•
KG - University
18 questions
Great Lakes States
Quiz
•
KG - University
7 questions
DNA, Chromosomes, Genes, and Traits: An Intro to Heredity
Interactive video
•
11th Grade - University
7 questions
Reflexive Verbs in Spanish
Lesson
•
9th Grade - University
7 questions
Narrative Writing 1
Interactive video
•
4th Grade - University
