What is the similarity between a structure, union and enumeration?

Home | Discussion Forum
Taiyari24Hour

What is the similarity between a structure, union and enumeration?



View More Related Question

1) What is the output of this C code?

#include <stdio.h>
struct p {
int k;
char c;
};
int p = 10;
int main()
{
struct p x;
x.k = 10;
printf("%d %d\n", x.k, p);
}

2) What is the output of this C code?

#include <stdio.h>
struct student {
int no;
char name[20];
};
void main()
{
student s;
s.no = 8;
printf("hello");
}

3) Which of the following are themselves a collection of different data types?

4) What is the output of this C code(according to C99 standard)?

#include <stdio.h>
struct p {
int k;
char c;
float f;
};
int main()
{
struct p x = {.c = 97, .k = 1, 3};
printf("%f \n", x.f);
}

5) User-defined data type can be derived by___________

UP Gk Online Test

taiyari24hour.com

Study 2 Online Says....
Kindly log in or signup.