C++ Programming
POINTERS MCQs
Total Questions : 10
Answer is Option A. -> fg
Pointer ptr points to string ‘fg’. So it prints fg.
Output:
$ g++ point.cpp
$ a.out
fg
Answer is Option A. -> ABCDEFGHIJ
Each time we are assigning 65 + i. In first iteration i = 0 and 65 is assigned. So it will print from A to J.
$ g++ point1.cpp
$ a.out
ABCDEFGHIJ
Answer is Option C. -> int ***fun(float*, char**)
None.
Answer is Option D. -> it will return some random number
Array element cannot be address of auto variable. It can be address of static or extern variables.
Answer is Option B. -> p now points to b
Assigning to refrence changes the object to which the refrence is bound.
Answer is Option C. -> int i; double* dp = &i;
dp is initialized int value of i.
Answer is Option A. -> x is a pointer to a string, y is a string
* is to be grouped with the variables not the data types.
Answer is Option C. -> pointer to function taking a char* argument and returns an int
None.
Answer is Option A. -> *
None.
Answer is Option D. -> point to a tye
A pointer can be in only 3 states a,b and c.
Recent Questions
Q. According To The Affordable Care Act, Children Can Be On The....
Q. A Truncated Polypeptide Is Synthesized Due To A Nonsense Mut....
Q. How Do The British Economists And Political Scientists React....
Q. Which Of The Following Is Not A Product Of Anaerobic Digesti....
Q. The Ratio For The Rate Of Washing To The Final Rate Of Filtr....
Q. To Turn On UJT, The Forward Bias On The Emitter Diode Should....
Q. Which Of The Following IR Radiation Is Used In Measuring Rel....
Q. The Hottest Part Of The Gas Flame Is Known As
Q. Ethyl Alcohol Cannot Be Produced
Q. Which Of The Following Can Be Correct Conclusion Drawn From ....
Q. ISS Is Less Sensitive Than Which Of The Following?
Q. Which Of The Following Is The Most Effective Inhibitor Of Gr....
Q. A Metallic Alloy In Which One Of The Constituent Metal Is __....
Q. Defense Department Analysts Worry That The Ability Of The Un....
Q. S1: If You Want To Do Well In Your Examinations You Need To ....
Q. Which One Of The Following Is Also Known As Solution ?
Q. (0.1667)(0.8333)(0.3333) Is Approximately Equal To: ....
Q. IR Is The Study Of
Q. if The Radius Of A Sphere Is Increased By 2 Cm, Then Its S....
Q. Statement I: When Water Is Heated, We See bubbles In It....