Discussion :: Const
-
Point out the error in the program.
#include int main() { const int k=7; int *const q=&k; printf("%d", *q); return 0; }
|
A.
Error: RValue required |
|
B.
Error: Lvalue required |
|
C.
Error: cannot convert from 'const int *' to 'int *const' |
|
D.
No error |
Answer : Option D
Explanation :
No error. This will produce 7 as output.
Be The First To Comment

Whatsapp
Facebook