
ECE431 - Pointer & Reference

Quiz
•
Computers
•
University
•
Hard
Dr Zaini
Used 1+ times
FREE Resource
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;
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
TECHFEST QUALIFYING ROUND

Quiz
•
University
20 questions
Algoritma + Pascal

Quiz
•
University
13 questions
Revision 2 MCA

Quiz
•
University
20 questions
Arquitectura de computadoras I

Quiz
•
University
20 questions
Set - 2

Quiz
•
University
20 questions
Quiz PBO SIA

Quiz
•
University
16 questions
Linked List and Arrays in JAVA

Quiz
•
University
20 questions
Assignment Quiz-2

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

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

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University