What is the output of C program with structures.?
int main()
{
structure hotel
{
int items;
char name[10];
}a;
strcpy(a.name, "TAJ");
a.items=10;
printf("%s", a.name);
return 0;
}
1 Crore+ students have signed up on EduRev. Have you? Download the App |
What is the output of C program.?
int main()
{
struct ship
{
int size;
char color[10];
}boat1, boat2;
boat1.size=10;
boat2 = boat1;
printf("boat2=%d",boat2.size);
return 0;
}
What is the output of C program with structures.?
int main()
{
struct tree
{
int h;
}
struct tree tree1;
tree1.h=10;
printf("Height=%d",tree1.h);
return 0;
}
What is the output of C program with structures pointers.?
int main()
{
struct forest
{
int trees;
int animals;
}F1,*F2;
F1.trees=1000;
F1.animals=20;
F2=&F1;
printf("%d ",F2.animals);
return 0;
}
What is the output of C program with Structure pointer in TurboC.?
int main()
{
struct books{
int pages;
char str[4];
}*ptr;
printf("%d",sizeof(ptr));
return 0;
}
What is actually passed if you pass a structure variable to a function.?
What is the output of C program with structures.?
int main()
{
struct paint{
int type;
int color;
}p1, p2;
p1.type=1;
p1.color=5;
if(sizeof(p1)==sizeof(p2))
{
printf("SAME");
}
else
{
printf("DIFFERENT");
}
return 0;
}
What is the output of c program with structures.?
int main()
{
struct car
{int color;};
struct garage
{
struct car mycar[10];
}gar;
struct car c1={5};
gar.mycar[0]=c1;
printf("%d",gar.mycar[0]);
return 0;
}
10 videos|13 docs|15 tests
|
10 videos|13 docs|15 tests
|