What is the correct syntax to declare a function foo() which receives an array of structure in function?
Answer: A
No answer description available for this question
Enter details here
What will be the output of the following C code?
main()
{
enum resut {pass, fail};
enum result s1,s2;
s1=pass;
s2=fail;
printf("%d",s1);
}
Answer: A
The code shown above results in an error, stating : storage size of s1 and s2 unknown. There is an error in the declaration of these variables in the statement: enum result s1,s2;
Enter details here
Which operator connects the structure name to its member name?
Answer: C
No answer description available for this question
Enter details here
#include
typedef enum{
Male, Female
}SEX;
int main()
{
SEX var = Male;
SEX var1 = Female;
printf("%s %s",var, var1);
return 0;
}
Answer: C
No answer description available for this que
Enter details here
Which operator connects the structure name to its member name?
Answer: C
No answer description available for this question
Enter details here
What will be output for the following code?
Answer: A
The code shown above results in an error, stating : storage size of t1 and t2 unknown. There is an error in the declaration of these variables in the statement: enum test1 t1,t2;
Enter details here
#include "stdio.h"
typedef enum{
Male=5, Female
}SEX;
int main()
{
SEX var = Male;
SEX var1 = Female;
printf("%d %d",var, var1);
return 0;
}
Answer: D
No answer description available for this question
Enter details here
#include‹stdio.h›
int main()
{
struct site
{
char name[] = "GeeksQuiz";
int no_of_pages = 200;
};
struct site *ptr;
printf("%d ", ptr->no_of_pages);
printf("%s", ptr->name);
getchar();
return 0;
}
Answer: D
No answer description available for this question.
Enter details here
What will be the output of the following C code?
#include
enum sanfoundry
{
a=1,b
};
enum sanfoundry1
{
c,d
};
int main()
{
enum sanfoundry1 s1=c;
enum sanfoundry1 s=a;
enum sanfoundry s2=d;
printf("%d",s);
printf("%d",s1);
printf("%d",s2);
}
Answer: D
The output of the code shown above is 101. This code shows that it is possible to store the symbol of one enum in another enum variable.
Enter details here
What will be output for the following code?
Answer: A
No answer description available for this question
Enter details here