
pointers quizz
Authored by Auzoom four
Education
University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Akhil is learning C programming and wants to organize his data effectively. Which of the following is used to define a structure in C?
A) struct
B) structure
C) structural
D) class
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
During a programming class, Alisha is learning about different data types in C. She comes across a concept that allows her to define a variable that can hold multiple types of data. What keyword is used to create a union type in C?
A) union
B) type
C) combine
D) merge
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Ishaan is learning C programming and wants to understand how to declare pointers. Which of the following is a valid way for him to declare a pointer in C?
A) int *ptr;
B) int ptr*;
D) ptr int;
C) *int ptr;
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Arnav is learning C programming and comes across the 'sizeof' operator. What is the purpose of the 'sizeof' operator in C?
A) To determine the size of a variable
C) To declare a variable
D) To initialize a variable
B) To allocate memory
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Avani is trying to understand what happens to a pointer in C that has not been initialized. What is the value of such a pointer?
C) Undefined
B) 0
A) NULL
D) Random value
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Rohan has a box that contains a key to another box. Which operator is used to access the value at the address stored in Rohan's box?
D) ::
C) ->
B) *
A) &
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens when Krish tries to dereference a NULL pointer in C?
D) It is safe and does nothing
C) It returns a random value
B) It causes a segmentation fault
A) It returns 0
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?