The declaration
int x ;
int &p=x ;
is same as the declaration
int x,*p ;
p=&x ;
This remark is
A. | true |
B. | false |
C. | sometimes true |
D. | none of the above |
Option: B Explanation : In the first declaration, p is aliased to x. In the second case, p is a separate variable and it will have an address that is different from that of x. Click on Discuss to view users comments. |
Consider the declarations
const char cc = 'h' ;
char *CP ;
const char *const ccpc = &CC;
char *const *cpcp ;
Which of the following statements
Statement I: cp = * cpcp ;
Statement II: * * cpcp = * cp ;
Statement III: * cp = * * cpcp ;
are legal?
A. | All are legal |
B. | All are illegal |
C. | Only statement I is illegal. |
D. | Statements I and III are illegal. |
Option: A Explanation : Click on Discuss to view users comments. |
Reference is not same as pointer because
A. | a reference can never be null |
B. | a reference once established cannot be changed. |
C. | reference doesn't need an explicit dereferencing mechanism. |
D. | All of these |
Option: D Explanation : Click on Discuss to view users comments. |
Syllabus covered in this section is-
This Section covers OOPS Questions Answers .These questions can be used for the preparation of various competitive and academic exams like
Who can benefit
Various Search Terms Used For This Section Are