What is the output of this C code?
#include
struct
{
int k;
char c;
} p;
int p = 10;
int main()
{
p.k = 10;
printf("%d %d\n", p.k, p);
}
a) Compile time error
b) 10 10
c) Depends on the standard
d) Depends on the compiler
View Answer
Answer:a
What is the output of this C code?
#include
struct
{
int k;
char c;
} p;
int p = 10;
int main()
{
p.k = 10;
printf("%d %d\n", p.k, p);
}
a) Compile time error
b) 10 10
c) Depends on the standard
d) Depends on the compiler
View Answer
Answer:a