Sail E0 Webinar
Question


Point out the error in the program.


#include<stdio.h>
const char *fun();
int main()
{
char *ptr = fun();
return 0;
}
const char *fun()
{
return "Hello";
}
Options:
A .  Error: Lvalue required
B .  Error: cannot convert 'const char *' to 'char *'
C .  No error and No output
D .  None of above
Answer: Option C



Submit Your Solution Below and Earn Points !
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers