In C++ a variable that has an & appended is storing a(n):
C++ References

Quiz
•
Computers, Science
•
6th - 12th Grade
•
Hard
Natalia Fumero
Used 29+ times
FREE Resource
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
value
address
integer
string
2.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
The "&" symbol is called a(n):
sandpaper
ampersand
percentage sign
andthisthat
3.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
I have a variable int a = 2;
then a variable int& b = a;
What happens if I change the value of b
Nothing
a changes as well
b gets bigger
a disappears
4.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Which of these looks like a possible output
int variable = 5;
cout<<&variable;
5
0x7ffc8d64e404
&5
this would throw an error
5.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
If the address of b is at 0x7ff.
What would the following code output?
int b = 160;
int &a = b;
int &c = a;
cout<<a <<endl;
cout<<&c;
160
160
0x7ff
160
160
0x7ff
0x7ff
0x7ff
6.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Given the function
int var(int& x){
x+= 10;
return 0;
};
What will this code output?
int main(){
int b = 160;
var(b);
cout<<b <<endl;
}
160 160
170
b
22xff
7.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Given the function
int var(int& a){
a*= 2;
return 0;
};
What will this code output?
int main(){
int b = 160;
int a = b - 60;
var(a);
cout <<b <<endl;
cout<< a <<endl;
}
160
200
160
320
320
160
160
80
Create a free account and access millions of resources
Similar Resources on Quizizz
17 questions
Elementele de bază ale limbajului C++

Quiz
•
10th Grade
10 questions
Dasar Pemrograman C++

Quiz
•
10th Grade
13 questions
Операторы If и Switch в C++

Quiz
•
10th Grade
13 questions
BÀI THỰC HÀNH 2

Quiz
•
7th - 8th Grade
10 questions
XI - Kuis AP 1

Quiz
•
11th Grade
10 questions
Wprowadzenie do C++

Quiz
•
8th Grade
12 questions
Test Cls 7 Sem I

Quiz
•
6th Grade
10 questions
Array

Quiz
•
10th Grade
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade
Discover more resources for Computers
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
12 questions
Dividing Fractions

Quiz
•
6th Grade
9 questions
1. Types of Energy

Quiz
•
6th Grade
20 questions
Parts of Speech

Quiz
•
3rd - 6th Grade
43 questions
LinkIt Test - 24-25_BM4_7th

Quiz
•
7th Grade
6 questions
Final Exam: Monster Waves

Quiz
•
6th Grade