0% found this document useful (0 votes)
59 views5 pages

Oops PDF

This document contains a 13 question quiz about C++ concepts like polymorphism, function overloading, templates, and friend functions. The quiz asks students to identify true/false statements and select the correct output for code examples. Multiple choice and fill-in-the-blank questions are included to assess understanding of key C++ programming concepts.

Uploaded by

Abhishek Chede
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views5 pages

Oops PDF

This document contains a 13 question quiz about C++ concepts like polymorphism, function overloading, templates, and friend functions. The quiz asks students to identify true/false statements and select the correct output for code examples. Multiple choice and fill-in-the-blank questions are included to assess understanding of key C++ programming concepts.

Uploaded by

Abhishek Chede
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

6/4/2020 L31+L32+L37+L38+L53+L54

L31+L32+L37+L38+L53+L54
Assessment-5

* Required

Register Number *

Enter your answer

Full Name *

Enter your answer

VIT mail ID *

Enter your answer

https://forms.office.com/Pages/ResponsePage.aspx?id=4jyW1JSvIkGVqWROiwFiTa1zi2J1ru5KmPsZmUfL9mpUNVAzTFZRMVZFNTRLWjRWNk… 1/5
6/4/2020 L31+L32+L37+L38+L53+L54

Function overloading is an example of Polymorphism in C++ *


(1 Point)

yes

no

A function that is a friend of a class can access private member of a class but
cannot manipulate them *
(1 Point)

false

true

Output of following program? *


(1 Point)

fun(int) called

fun(Test 2) called

Compiler Error: Ambiguous call to fun()

https://forms.office.com/Pages/ResponsePage.aspx?id=4jyW1JSvIkGVqWROiwFiTa1zi2J1ru5KmPsZmUfL9mpUNVAzTFZRMVZFNTRLWjRWNk… 2/5
6/4/2020 L31+L32+L37+L38+L53+L54

Through templates, rather than repeating function code for each new type
we wish to accommodate, we can create functions that are capable of using
the same code for different types. *
(1 Point)

false

true

What would be the output of the following code? *


(1 Point)

2, 3.5

5, -1.5

Error

Unless you have the source code of the class you cannot make the
declaration of the friend function inside that class *
(1 Point)

https://forms.office.com/Pages/ResponsePage.aspx?id=4jyW1JSvIkGVqWROiwFiTa1zi2J1ru5KmPsZmUfL9mpUNVAzTFZRMVZFNTRLWjRWNk… 3/5
6/4/2020 L31+L32+L37+L38+L53+L54

false

true

10

If an entire class is made a friend of another, then all the member functions
of this class can access the private data members of the original class *
(1 Point)

false

true

11

Whether the following code will run successfully or throw an compile time
error? *
(1 Point)

Runs successfully

compile time error

https://forms.office.com/Pages/ResponsePage.aspx?id=4jyW1JSvIkGVqWROiwFiTa1zi2J1ru5KmPsZmUfL9mpUNVAzTFZRMVZFNTRLWjRWNk… 4/5
6/4/2020 L31+L32+L37+L38+L53+L54

12

Which of the following operators cannot be overloaded *


(1 Point)

. (Member Access or Dot operator)

?: (Ternary or Conditional Operator )

:: (Scope Resolution Operator)

.* (Pointer-to-member Operator )

All of the above

13

Can we overload a function named 'main()' which is a member of a class? *


(1 Point)

Yes

No

Submit

Never give out your password. Report abuse

This content is created by the owner of the form. The data you submit will be sent to the form owner.

Powered by Microsoft Forms | Privacy and cookies | Terms of use

https://forms.office.com/Pages/ResponsePage.aspx?id=4jyW1JSvIkGVqWROiwFiTa1zi2J1ru5KmPsZmUfL9mpUNVAzTFZRMVZFNTRLWjRWNk… 5/5

You might also like