Const

Q1:
Point out the error in the program.
#include<stdio.h>

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

ANS:A - Error: RValue required

No error. This will produce 7 as output.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.