
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
15 questions
Milking Minds 2 17-01-24

Quiz
•
University
15 questions
C Pointers 17May2023

Quiz
•
University
15 questions
C PROGRAMMING 2

Quiz
•
University
15 questions
Java Programming

Quiz
•
University
20 questions
UAS Struktur Data 2022

Quiz
•
University
20 questions
Array of structures

Quiz
•
University
20 questions
Pointers

Quiz
•
University
15 questions
C programming

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University