
Module1_Quiz
Authored by Guruvammal S
Computers
University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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.
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
BASIC C QUIZ
Quiz
•
University
20 questions
ทดสอบย่อย 3 หลักการเขียนโปรแกรม
Quiz
•
University
20 questions
L73_118 Prep for Test
Quiz
•
12th Grade - University
19 questions
Programación Básica Prácticas Tema 2
Quiz
•
University
17 questions
Diagrama de Classes I
Quiz
•
University
20 questions
POO_BasicoyJava
Quiz
•
University
15 questions
8051-MCQ
Quiz
•
University
20 questions
Control Structures C#
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade