-
What will be the output of the following C code?
#include <stdio.h>
struct Country
{
char *name;
};
struct Country function(void)
{
struct Country cnt1;
cnt1.name = "India";
return cnt1;
}
void main()
{
struct Country cnt2 = function();
printf("%s", cnt2.name);
}
-
- India
- Compilation Error
- Garbage value
- Nothing
- None of these
Correct Option: A
India