1.  What will be the output of the following code ?
struct abc{int a; int b;} v[3], *p;
main()
{
p=v;
p->a=3;
p->b=p->a;
printf(‘’\n%d\t%d’’, v[0].a, v[0].b);
}


3 4
4 3
Any garbage value
3 3


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

2.  What will be the output of the following program ?
main()
{
struct emp
{
char name[20];
int age;
float sal;
};
struct emp e={‘’Tiger’’};
printf(‘’\n%d%f’’),e.age, e.sal;
}


0 0.000000
Garbage values
Error
None of the above


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

3.  What will be the output of the following code ?
struct
{
int a;
double d;
float cp;
}s;
void main()
{
printf(‘’%d\t%d\t%d\t%d’’, sizeof(s.a), sizeof(s.d), sizeof(s.cp), sizeof(s));
}


4, 8, 4, 24
8, 2, 4, 12
10, 4, 6, 4
4, 8, 4, 14


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

4.  What is the output of this C code ?
void main()
{
struct student
{
int no;
char name[20];
};
struct student s;
s.no = 8;
printf(‘’%d’’, s.no);
}


Nothing
Compile time error
Junk
8


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

5.  Number of bytes in memory taken by the below structure is ?
struct test
{
int k;
char c;
};


Multiple of integer size
integer size+character size
Depends on the platform
Multiple of word size


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report