Const

Q1:
Point out the error in the program.
#include<stdio.h>
const char *fun();

int main()
{
    *fun() = 'A';
    return 0;
}
const char *fun()
{
    return 'Hello';
}

A Error: RValue required

B Error: Lvalue required

C Error: fun() returns a pointer const character which cannot be modified

D No error

ANS:A - Error: RValue required

No answer description is available. Let's discuss.



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.