C++ References

C++ References

6th - 12th Grade

12 Qs

quiz-placeholder

Similar activities

Simulasi KSN IPA

Simulasi KSN IPA

4th - 6th Grade

10 Qs

6.SINIF YOĞUNLUK

6.SINIF YOĞUNLUK

6th Grade

15 Qs

مراجعة حاسب2 ثلاث وحدات

مراجعة حاسب2 ثلاث وحدات

11th Grade

16 Qs

Elements and compounds

Elements and compounds

7th Grade

10 Qs

4.6.4 Logic Gates

4.6.4 Logic Gates

10th Grade - Professional Development

15 Qs

Ôn lại kiến thức  Lớp 3 T13

Ôn lại kiến thức Lớp 3 T13

1st - 10th Grade

10 Qs

Ôn tập các phép đo

Ôn tập các phép đo

6th Grade - Professional Development

16 Qs

ODDYCHANIE KARTKÓWKA

ODDYCHANIE KARTKÓWKA

9th - 11th Grade

11 Qs

C++ References

C++ References

Assessment

Quiz

Computers, Science

6th - 12th Grade

Practice Problem

Medium

Created by

Natalia Fumero

Used 33+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

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

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

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?