-
What will be the output of the following C code?
#include <stdio.h>
struct Clothes
{
int size;
char Brand_name[50];
};
void main()
{
Clothes c;
c.size = 39;
printf("Jockey");
}
-
- Jockey
- 39
- Compilation Error
- Garbage value
- None of these
Correct Option: C
Compilation Error
main.c: In function ‘main’:
main.c:9:9: error: unknown type name ‘Clothes’; use ‘struct’ keyword to refer to the type
Clothes c;
^~~~~~~
struct
main.c:10:10: error: request for member ‘size’ in something not a structure or union
c.size = 39;
^