
ECE431 - Pointer & Reference
Authored by Dr Zaini
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
16 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does int* ptr = &num do?
Declares an integer
Stores the value of num
Declares a pointer to num
Assigns the value num to ptr
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If x = 5 and int* px = &x;
what does *px return?
5
Memory address of x
Error
Undefined value
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the statement *mark = 40; do, if mark is a pointer to an integer?
Stores 40 in a new location
Changes the address mark is pointing to
Changes the value at the pointed location to 40
Causes a segmentation fault
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of: int score = 88; int* pScore = &score; *pScore = 90; cout << score;
88
90
Error
Address of score
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which operator is used to declare a pointer?
&
*
%
^
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of &temp in int* p = &temp;?
Declare a new pointer
Get the value of temp
Get the address of temp
Initialize temp
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which line declares a reference / alias correctly?
int ref = *val;
int* ref = val;
int& ref = val;
int& ref = &val;
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
ARRAYS AND FUNCTIONS
Quiz
•
University
20 questions
REMEDIAL PAS KJD GANJL
Quiz
•
University
15 questions
Arrays and Pointers in C
Quiz
•
University
13 questions
Chap 1: What is a program made of?
Quiz
•
University
21 questions
Новогодняя. Python
Quiz
•
9th Grade - University
20 questions
UAS Sistem Operasi
Quiz
•
University
20 questions
C - Structures
Quiz
•
University
12 questions
Access
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