
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
15 questions
uNIT 11_14

Quiz
•
University
19 questions
Get started with python

Quiz
•
University
20 questions
TECH FUED ROUND-1

Quiz
•
University
25 questions
Pointers in C

Quiz
•
University
18 questions
C++ Pointers Quiz w/ Arrays

Quiz
•
University
20 questions
Python Functions Quiz

Quiz
•
University
20 questions
quiz dasar python

Quiz
•
1st Grade - University
20 questions
Programming Concepts in C

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University