The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 305 Weeks Ago, 1 Day Ago |
| Questions Answered: | 15833 |
| Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
1.A throw block is where
A) an exception may be thrown
B) where execution continues after an exception
C) a catch takes place
D) an exception is handled
2.Which function declaration passes a pointer as a parameter?
A)void func1(int piVal, double *pdVal);
B)double func4(int &piVal, double &pdVal);
C)void func2(int &piVal, double pdVal);
D)int* func3(int piVal, double pdVal);
Â
3. In which area of memory are dynamic variables located?
A)Heap
B)Stack
C)Code
D)None listed
4.which of these declares a function pointer?
A)int (*calc)();
B)int *calc();
C)int *pt[3];
D)int &pt=num;
5.A string function that returns a boolean value is
A)empty()
B)find()
C)at()
D)compare()
6.Function members of a class gain access to the calling object's members byÂ
A) a pointer to the calling object that is implicitly provided by the compiler. The name if this pointer is this. The members are prefixed implicitly by this-> as in this->membername
B)a variable called self that is an alias for the calling object. This self is used to access the members of the object as in self.membername
C)there is no particular mechanism, the variables just know what the calling object is and automatically refer to the calling object
D)None of the above
7.Which statement invokes the constructor for class Complex?
A)Complex a;
B)Complex a, b(6.8, 9.7);
C)All listed
D)Complex b(6.8, 9.7);
8.Which function declaration is NOT accepting an array of ints as a parameter?
A)int findMax(int &vals, int size);
B)int findMax(int vals[], int size);
C)int findMax(int *vals, int size);
D)int findMax(int **vals, int size);
----------- He-----------llo----------- Si-----------r/M-----------ada-----------m -----------Tha-----------nk -----------you----------- fo-----------r y-----------our----------- in-----------ter-----------est----------- an-----------d b-----------uyi-----------ng -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------. P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll -----------be -----------qui-----------ckl-----------y