You are on page 1of 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