ExamVeda
Login
Home
This question belongs to C Program Pointer
Pointer
?

Find the output of the following program.
void main()
{
   char *msg = "hi";
   printf(msg);
}

Answer & Solution
Correct Answer: Option A
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

5 Comments
Magdy Nasr
Magdy Nasr 3 years ago
it gives the address of h
Vaishnavi Boje
Vaishnavi Boje 6 years ago
But it does not provide %d or %u so it should be error
Vaishnavi Boje
Vaishnavi Boje 6 years ago
But it does not provide %d or %u
Rahul Yadav
Rahul Yadav 9 years ago
how is possible if msg is a pointer so it should be a garbage value
Mayank Sharma
Mayank Sharma 9 years ago
Ca anybody explain thi