Question 1

Time: 00:00:00
what will be the value of b of following C++ code?
#include
using namespace std;
int main() {
int a=20, b= a+(a)++ + (++a);
cout<<(b++);
}

63

63

64

64

60

60

61

61

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 2

Time: 00:00:00
Which of the following is used for comment in C++

//

//

/

/

/* /

/* /

// */

// */

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 3

Time: 00:00:00
Which of the following in C++ does not represent type of constructor

Default constructor

Default constructor

Friend constructor

Friend constructor

Copy constructor

Copy constructor

Parameterized constructor

Parameterized constructor

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 4

Time: 00:00:00
Which of the following statements regarding this C++ pointer is true

All static variables in a class receive this pointer as a hidden argument.

All static variables in a class receive this pointer as a hidden argument.

All of a class's functions take this pointer as a secret argument

All of a class's functions take this pointer as a secret argument

All non-static functions of a class receive this pointer as a hidden argument.

All non-static functions of a class receive this pointer as a hidden argument.

In all static functions of a class, this pointer is supplied as a hidden argument.

In all static functions of a class, this pointer is supplied as a hidden argument.

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 5

Time: 00:00:00
What will be the value of a for N =2 in C++ code?

#include
using namespace std;

int main() {
int a = 5;
for (int i = 0; i i; j--) {
a = a + i + j;
}
}
cout<<a;
return 0;
}

11

11

5

5

12

12

10

10

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 6

Time: 00:00:00
Which of the following types does C++ offer but C does not

Double

Double

bool

bool

float

float

Int

Int

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 7

Time: 00:00:00
What purpose does indentation serve in C++

makes a distinction between inner data and comments

makes a distinction between inner data and comments

makes a distinction between comments and extraneous data

makes a distinction between comments and extraneous data

makes a distinction between code and comments

makes a distinction between code and comments

makes a distinction between comments and external data

makes a distinction between comments and external data

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 8

Time: 00:00:00
which performs better when calling C++ functions

Call by reference

Call by reference

Call by object

Call by object

Call by pointer

Call by pointer

Call by value

Call by value

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 9

Time: 00:00:00
In C++, the function declaration is terminated by which of the following

;

;

:

:

)

)

\

\

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 10

Time: 00:00:00
What does C++'s inheritance mean

Creating new classes from existing ones

Creating new classes from existing ones

Class overloading

Class overloading

Class names that are the same

Class names that are the same

Combining data into one class

Combining data into one class

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

["0","40","60","80","100"]
["Need more practice!","Keep trying!","Not bad!","Good work!","Perfect!"]

Personalized Analytics only Availble for Logged in users

Analytics below shows your performance in various Mocks on PrepInsta

Your average Analytics for this Quiz

Rank

-

Percentile

0%

Get over 200+ Courses under One Subscription

mute

Don’t settle Learn from the Best with PrepInsta Prime Subscription

Learn from Top 1%

One Subscription, For Everything

The new cool way of learning and upskilling -

Limitless Learning

One Subscription access everything

Job Assistance

Get Access to PrepInsta Prime

Top Faculty

from FAANG/IITs/TOP MNC's

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others.