HirePro C/CPP Quiz 1

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

Start

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

Start

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

Start

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

Start

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

Start

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

Start

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

Start

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

Start

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

Start

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

Start

["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%

Completed

0/10

Accuracy

0%

Prime

PrepInsta Prime Mock

For HirePro
Get Prime Mock

Prime

PrepInsta Prime Video

Complete video course for HirePro

For HirePro
Get Prime Video
Get Prepinsta Prime

Get all 200+ courses offered by Prepinsta

Never Miss an OffCampus Update

Get OffCampus Updates on Social Media from PrepInsta

Follow us on our Media Handles, we post out OffCampus drives on our Instagram, Telegram, Discord, Whatsdapp etc.

Get Hiring Updates
Amazon,Google,Delottie & 30+companies are hiring ! Get hiring Updates right in your inbox from PrepInsta

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.

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.

Get PrepInsta Prime Subscription

Get access to all the courses that PrepInsta offers, check the out below -

Companies

TCS, Cognizant, Delloite, Infosys, Wipro, CoCubes, KPMG, Amazone, ZS Associates, Accenture, Congnizant & other 50+ companies

Programming

Data Structures, Top 500 Codes, C, C++, Java Python & other 10+ subjects

Skills

Full Stack Web Development, Data Science, Machine Learning, AWS Cloud, & other 10+ skills and 20+ projects