Q101
Open questionstruct temp
{
int a : 13;
int b : 8;
int c : x;
}s;Select an option to see the answer and solution.
Practice every MCQ with options. Use Show answers when you want the correct option and solution.
190
Questions
6/10
Page
Pick an option on a question to see the right answer and solution.
Q101
Open questionstruct temp
{
int a : 13;
int b : 8;
int c : x;
}s;Select an option to see the answer and solution.
Q102
Open question#include <stdio.h>
struct p
{
char *name;
struct p *next;
};
struct p *ptrary[10];
int main()
{
struct p p, q;
p.name = "xyz";
p.next = NULL;
ptrary[0] = &p;
strcpy(q.name, p.name);
ptrary[1] = &q;
printf("%s\n", ptrary[1]->name);
return 0;
}Select an option to see the answer and solution.
Q103
Open questionSelect an option to see the answer and solution.
Q104
Open questionSelect an option to see the answer and solution.
Q105
Open questionSelect an option to see the answer and solution.
Q106
Open question#include <stdio.h>
struct student
{
char *c;
};
void main()
{
struct student n;
struct student *s = &n;
(*s).c = "hello";
printf("%p\n%p\n", s, &n);
}Select an option to see the answer and solution.
Q107
Open questionSelect an option to see the answer and solution.
Q108
Open questionshort a : 17;
int long y : 33;Select an option to see the answer and solution.
Q109
Open question#include <stdio.h>
union u
{
struct
{
unsigned char x : 2;
unsigned int y : 2;
}p;
int x;
};
int main()
{
union u u.p = {2};
printf("%d\n", u.p.x);
}Select an option to see the answer and solution.
Q110
Open questionSelect an option to see the answer and solution.
Q111
Open question#include <stdio.h>
union p
{
int x;
char y;
};
int main()
{
union p p, b;
p.y = 60;
b.x = 12;
printf("%d\n", p.y);
}Select an option to see the answer and solution.
Q112
Open question#include <stdio.h>
struct p
{
int k;
char c;
float f;
};
int p = 10;
int main()
{
struct p x = {1, 97};
printf("%f %d\n", x.f, p);
}Select an option to see the answer and solution.
Q113
Open questionSelect an option to see the answer and solution.
Q114
Open question#include <stdio.h>
union u
{
struct
{
unsigned char x : 2;
unsigned int y : 2;
}p;
int x;
};
int main()
{
union u u;
u.p.x = 2;
printf("%d\n", u.p.x);
}Select an option to see the answer and solution.
Q115
Open question#include <stdio.h>
struct student
{
int no;
char name[20];
}
void main()
{
struct student s;
s.no = 8;
printf("hello");
}Select an option to see the answer and solution.
Q116
Open questionSelect an option to see the answer and solution.
Q117
Open questionSelect an option to see the answer and solution.
Q118
Open questionstruct node
{
struct node *left;
struct node *centre;
struct node *right;
};Select an option to see the answer and solution.
Q119
Open questionstruct-declarator:
declarator
type-specifier declarator opt : constant-expressionSelect an option to see the answer and solution.
Q120
Open question#include <stdio.h>
struct student
{
char *c;
};
void main()
{
struct student s[2];
printf("%d", sizeof(s));
}Select an option to see the answer and solution.