Qualcomm Functions Quiz-1

Question 1

Time: 00:00:00
Which of the following statement is correct?

C++ enables to define functions that take constants as an argument.

C++ enables to define functions that take constants as an argument.

We cannot change the argument of the function that is declared as constant.

We cannot change the argument of the function that is declared as constant.

Both A and B.

Both A and B.

We cannot use the constant while defining the function.

We cannot use the constant while defining the function.

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 statement will be correct if the function has three arguments passed to it?

The trailing argument will be the default argument.nt.

The trailing argument will be the default argument.nt.

The first argument will be the default argument.

The first argument will be the default argument.

The middle argument will be the default argument.

The middle argument will be the default argument.

All the argument will be the default argument

All the argument will be the default argument

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 statement is correct?

Constructors can have default parameters.

Constructors can have default parameters.

Constructors cannot have default parameters.

Constructors cannot have default parameters.

Constructors cannot have more than one default parameter.

Constructors cannot have more than one default parameter.

Constructors can have at most five default parameters.

Constructors can have at most five default parameters.

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 function declaration is/are incorrect?

int Sum(int a, int b = 2, int c = 3);

int Sum(int a, int b = 2, int c = 3);

int Sum(int a = 5, int b);

int Sum(int a = 5, int b);

int Sum(int a = 0, int b, int c = 3);

int Sum(int a = 0, int b, int c = 3);

Both B and C are incorrect.

Both B and C are incorrect.

All are correct.

All are correct.

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

Please login to submit your explanation

Start

Question 5

Time: 00:00:00
Where the default value of parameter have to be specified?

Function call

Function call

Function definition

Function definition

Function prototype

Function prototype

Both B or C

Both B or C

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 statement is incorrect?

A default argument is checked for the type at the time of declaration and evaluated at the time of the call.

A default argument is checked for the type at the time of declaration and evaluated at the time of the call.

We can provide a default value to a particular argument in the middle of an argument list.

We can provide a default value to a particular argument in the middle of an argument list.

We cannot provide a default value to a particular argument in the middle of an argument list.

We cannot provide a default value to a particular argument in the middle of an argument list.

Default arguments are useful in situations where some arguments always have the same value.

Default arguments are useful in situations where some arguments always have the same value.

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 will be the output of the following program?

#include
typedef void(*FunPtr)(int);
int Look(int = 10, int = 20);
void Note(int);
int main()
{
FunPtr ptr = Note;
(*ptr)(30);
return 0;
}
int Look(int x, int y)
{
return(x + y % 20);
}
void Note(int x)
{
cout<< Look(x) << endl;
}

10

10

20

20

30

30

40

40

Compilation fails.

Compilation fails.

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

Please login to submit your explanation

Start

Question 8

Time: 00:00:00
What will be the output of the following program?

#include
struct MyData
{
public:
int Addition(int a, int b = 10)
{
return (a *= b + 2);
}
float Addition(int a, float b);
};
int main()
{
MyData data;
cout< cout< return 0;
}

12 12

12 12

12 18

12 18

3 14

3 14

18 12

18 12

Compilation fails.

Compilation fails.

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! \r\n","Keep trying! \r\n","Not bad! \r\n","Good work! \r\n","Perfect! \r\n"]

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/8

Accuracy

0%

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

Comments