
Module1_Quiz

Quiz
•
Computers
•
University
•
Hard
Guruvammal S
Used 1+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a characteristic of static arrays?
Size can be changed at runtime
Size must be known at compile time
Memory is allocated dynamically
None of the above
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you initialize an array in C?
int arr(5) = {1, 2, 3};
int arr[5] = {1, 2, 3};
int arr = {1, 2, 3};
int arr[5];
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? int arr[] = {1, 2, 3}; printf("%d", arr[1]);
1
2
3
Compilation error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a pointer in C?
A variable that holds data values.
A variable that holds the address of another variable.
A type of function.
A type of array.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which operator is used to access the value at the address stored in a pointer? int* ptr; What operator should be used?
&
*
->
[]
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If you have an integer variable x, how do you assign its address to a pointer p? int x; What should be done?
&x
*x
x
x&
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will happen if you dereference an uninitialized pointer? int* p; printf("%d", *p); What type of error will occur?
Syntax error
Runtime error (undefined behavior)
Compilation error
No error; it will print garbage value.
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Algo Duel

Quiz
•
University
25 questions
Aptitude Competition(SY)

Quiz
•
University
25 questions
C/C++ Programming Quiz

Quiz
•
University
15 questions
Тест з програмування на Python

Quiz
•
12th Grade - University
25 questions
DSA - Q1

Quiz
•
University
15 questions
Computer Science Quiz

Quiz
•
University
15 questions
Array Java

Quiz
•
University
20 questions
Linux 3-4

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