Object Oriented Programming MCQs

Page No. 79

The names given to the default arguments are only looked up and ________________ and are bound during declaration.


aChecked for availability


bChecked for random access


cChecked for accessibility


d Checked for feasibility



The using declaration __________


aDoesn’t carry over the default values


bCarries over the known default arguments


cCarries over only the normal arguments


dCarries over only few default arguments



The non-template functions can be added with default arguments to already declared functions ____________________


aIf and only if the function is declared again in the same scope


bIf and only if the function is declared only once in the same scope


cIf and only if the function is declared in different scope


dIf and only if the function is declared twice in the program



Which among the following is false for default arguments?


aThose are not allowed with a declaration of pointer to functions


bThose are not allowed with the reference to functions


cThose are not allowed with the typedef declarations


dThose are allowed with pointer and reference to function declaration



Default arguments are _________________________


aOnly allowed in the parameter list of the function declaration


bOnly allowed in the return type of the function declaration


cOnly allowed with the class name definition


dOnly allowed with the integer type values



Which among the following is a wrong call to the function void test(int x, int y=0, int z=0)?


atest(5,6,7);


btest(5);


ctest();


dtest(5,6);


View Answer test();

What function will be called with the independent syntax “test(5,6,7);”?


avoid test(int x, int y)


bvoid test(int x=0, int y, int z)


cint test(int x=0, y=0, z=0)


dvoid test(int x, int y, int z=0)



Which among the following is correct?


avoid test(int x=0, int y, int z=0)


bvoid test(int x=0, int=0)


cvoid test(int x, int y=0)


dvoid test(int x=’c, int y)



If a function have all the default arguments but still some values are passed to the function then ______________


aThe function will use the values passed to it


bThe function will use the default values as those are local


cThe function can use any value whichever is higher


dThe function will choose the minimum values



Which among the following function can be called without arguments?


avoid add(int x, int y=0)


bvoid add(int=0)


cvoid add(int x=0, int y=0)


dvoid add(char c)



Goto Page No.

Page 79 of 93

Alphabetical MCQs Categories

Here below You find all kind of categories of MCQs in alphabetical order.


"Comprehensive Collection of MCQs: Alphabetically Organized by Subject"

"Discover an extensive collection of multiple-choice questions (MCQs) neatly categorized by subject from A to Z. This resource is designed for anyone eager to explore various topics in a straightforward and organized manner. Whether you're a student preparing for exams, an educator seeking supplementary materials, or simply curious about different subjects, this compilation offers a convenient way to learn and assess your knowledge. With questions arranged alphabetically, navigation is effortless, allowing you to delve into subjects of interest at your own pace. Engage, learn, and expand your understanding with this accessible and comprehensive repository of MCQs!"


BolPakistan

bolpakistan.com.pk includes Job Mcqs and Pak Mcqs is the Top Largest Mcqs Forum in World, in which you can read Mcqs of All Subjects, PPSC test preparation, FPSC, NTS and PPSC PAST PAPERS, PPSC PAST MCQS. A Collection of Repeated MCQs for JOBs seekers.

Copyright © 2024, Designed & Developed by BolPakistan