References in C++

References in C++

Professional Development

13 Qs

quiz-placeholder

Similar activities

DAY 1 - C& C++ Assessment _10th June 24

DAY 1 - C& C++ Assessment _10th June 24

Professional Development

10 Qs

Desafío Java fácil

Desafío Java fácil

Professional Development

10 Qs

SFDC Apex Developer Training

SFDC Apex Developer Training

Professional Development

10 Qs

Quiz - 2

Quiz - 2

Professional Development

9 Qs

Arrays & Strings using C

Arrays & Strings using C

Professional Development

15 Qs

Day17_Quiz_NBKR

Day17_Quiz_NBKR

Professional Development

10 Qs

Infoarduino

Infoarduino

10th Grade - Professional Development

10 Qs

C Operators

C Operators

University - Professional Development

15 Qs

References in C++

References in C++

Assessment

Quiz

Professional Development

Professional Development

Hard

Created by

RAGHUVEER KASYAP

Used 4+ times

FREE Resource

13 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statement is true about the references?

Defining a reference variable allocates a separate memory.

Reference variable can point to any variable once it is initialized

Reference to an object creates a copy

Reference variable must be initialized to NULL

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A reference variable must be initialized to null

True

False

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

True Or False

A reference variable can point to any variable once initialized

True

False

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A reference variable must be initialized to ___________

null

0

variable

address of a variable

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the below code snippet?

int a=10;

int b=20;

int &ref=a;

int *ptr=&b;

ref += *ptr;

ref++;

cout<<a<<"\t"<<b;

10 20

20 10

31 20

20 31

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the below code snippet?

int a=1000;

float &b=a;

b++;

cout<<a;

1000

1001

Prints the address of the variable a

Compilation error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A friend function can be declared under which access specifier

Private

Protected

Public

All

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?

Discover more resources for Professional Development