
References in C++

Quiz
•
Professional Development
•
Professional Development
•
Hard
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
Similar Resources on Wayground
16 questions
UC_TM02_C Programming Basics

Quiz
•
University - Professi...
10 questions
Day_1_Quiz_NBKR

Quiz
•
Professional Development
10 questions
Day12_Quiz_NBKR

Quiz
•
Professional Development
8 questions
REPASO C++

Quiz
•
Professional Development
10 questions
Web Development Workshop

Quiz
•
University - Professi...
10 questions
LC - Aula 04

Quiz
•
Professional Development
18 questions
Тесть по PHP #1

Quiz
•
Professional Development
10 questions
Recursia

Quiz
•
Professional Development
Popular Resources on Wayground
55 questions
CHS Student Handbook 25-26

Quiz
•
9th Grade
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
10 questions
Chaffey

Quiz
•
9th - 12th Grade
15 questions
PRIDE

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
22 questions
6-8 Digital Citizenship Review

Quiz
•
6th - 8th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade