You are on page 1of 2

Final Lab Quiz 1

Com prog

Which is more effective while calling the functions?

call by reference

Choose the correct answer for following piece of C++ pseudo code

a is pass by value and b is pass by reference

Which function cannot be overloaded in C++ program?

Static function

Which function can be called without using an object of a class in C++

Static function

Which of the following functions are provided by compiler by default if we don’t write in
a C++ class?
Copy constructor – wrong answer

Inline functions may not work ______ . i) If function contain static variables. ii) If function contain
global and register variables. iii) If function returning value consists looping construct(i.e. for,
while). iv) If inline functions are recursive. v) If function contains const value.
Only ii,iii & v – wrong answer

Predict the output :

3.1

Which of the following in Object Oriented Programming is supported by Function overloading


and default arguments features of C++.
Polymorphism

What is the scope of the variable declared in the user defined function
Only inside the {} block

A function in C++ that does not return a value is declared with-

Void return type

You might also like