NTT Data function and Scopes Quiz-1

Question 1

Time: 00:00:00
A scope that can be used anywhere in the entire program?

Function scope.

Function scope.

Global Scope.

Global Scope.

Local scope.

Local scope.

Variable Scope.

Variable Scope.

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

Please login to submit your explanation

Question 2

Time: 00:00:00
A function is __________?

Dependent.

Dependent.

Independent.

Independent.

Both A and B

Both A and B

None of the above

None of the above

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

Please login to submit your explanation

Question 3

Time: 00:00:00
What are the types of Overriding Functions?

Generic function overriding

Generic function overriding

Virtual function based overriding

Virtual function based overriding

Both A and B

Both A and B

None of the Above

None of the Above

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

Please login to submit your explanation

Question 4

Time: 00:00:00
________overloading helps us to save the memory space, consistency, and readability of our code?

Operator Overloading.

Operator Overloading.

Function Overloading.

Function Overloading.

Function Overriding.

Function Overriding.

Operator Overriding.

Operator Overriding.

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

Please login to submit your explanation

Question 5

Time: 00:00:00
_________ declared with the same name and the same parameter types cannot be overloaded?

Static member function

Static member function

Inline member function.

Inline member function.

Member Function

Member Function

Overloading

Overloading

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

Please login to submit your explanation

Question 6

Time: 00:00:00
A function definition in a class definition is _____?

Static member function.

Static member function.

Const

Const

member function

member function

Inline member function.

Inline member function.

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

Please login to submit your explanation

Question 7

Time: 00:00:00
A _______function which has no side effect while its execution?

Procedural

Procedural

Pure

Pure

friendship

friendship

overloading

overloading

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

Please login to submit your explanation

Question 8

Time: 00:00:00
What are automatic variables?

Local variables.

Local variables.

Global variables.

Global variables.

System variables.

System variables.

Temporary Variables.

Temporary Variables.

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

Please login to submit your explanation

Question 9

Time: 00:00:00
Any ________defined in a class outside of any method can be used by all member methods?

Constructor

Constructor

Variable

Variable

Function

Function

Value

Value

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

Please login to submit your explanation

Question 10

Time: 00:00:00
Find the Output for the following code?
#include<iostream>

using namespace std;

inline int Max(int x, int y)
{
return (x > y)? x : y;
}
int main() {
cout << "Max (3,20): " << Max(3,20) << endl;
cout << "Max (28,150): " << Max(28,150) << endl;
cout << "Max (888,1000): " << Max(888,1000) << endl;

return 0;
}

20 150 888

20 150 888

3 28 1000

3 28 1000

20 150 1000

20 150 1000

None of the above

None of the above

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.

Comments