What is stored in a pointer variable?

Module4QuizLabWth230

Quiz
•
Science
•
University
•
Medium
Armilyn Martinez
Used 3+ times
FREE Resource
40 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 2 pts
Value of a variable
Address of a variable
Data type of a variable
Size of a variable
2.
MULTIPLE CHOICE QUESTION
45 sec • 2 pts
In the following code snippet, what does p+1 represent? int number = 5; int *p = &number; p = p + 1;
Incrementing the value of number
The next integer value in memory
Moving the pointer to the next memory location
Adding 1 to the address stored in p
3.
MULTIPLE CHOICE QUESTION
45 sec • 2 pts
Which operator is used to dereference a pointer?
&
*
->
%
4.
MULTIPLE CHOICE QUESTION
45 sec • 2 pts
What will the following program output if run on a 32-bit architecture? int number = 10; int *p = &number; printf("%u\n", p); p = p + 1; printf("%u\n", p);
Address increases by 1
Address increases by 2
Address increases by 4
Address remains unchanged
5.
MULTIPLE CHOICE QUESTION
45 sec • 2 pts
What does the following code print? int arr[3] = {10, 20, 30}; int *p = arr; printf("%d\n", *(p + 2));
10
20
30
Error
6.
MULTIPLE CHOICE QUESTION
45 sec • 2 pts
What does the following code initialize in p2? struct Point p2 = {.x = 20};
All members are initialized to 0
Only x is initialized, others are undefined
All members are initialized to the same value
Compilation error
7.
MULTIPLE CHOICE QUESTION
45 sec • 2 pts
Which member access operator is used to access a structure's member?
->
.
*
&
Create a free account and access millions of resources
Similar Resources on Quizizz
42 questions
Lab-PCLP-General

Quiz
•
University
36 questions
Final Exam Information

Quiz
•
University
43 questions
2.1 2.2 Chemistry CP review

Quiz
•
9th Grade - University
36 questions
biotech unit 3

Quiz
•
11th Grade - University
35 questions
Gr. 9 Environmental Chemistry Review

Quiz
•
9th Grade - University
45 questions
EP - Integrals

Quiz
•
1st Grade - University
37 questions
Latihan Bayangan Soal PSA TIK Kls VI 2024

Quiz
•
4th Grade - University
35 questions
end of year Quiz

Quiz
•
12th Grade - University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade