Q.1.

Point out the error in the program?

typedef struct data mystruct;
struct data
{
    int x;
    mystruct *b;
};
Q.2.

What will be the output of the program given below in 16-bit platform ?

#include<stdio.h>

int main()
{
    enum value{VAL1=VALVALVALVALvar;
    printf("%d\n", sizeof(var));
    return}
Q.3.

Point out the error in the program?

struct emp
{
    int ecode;
    struct emp *e;
};
Q.4.

Which of the following statements correct about the below program?

#include<stdio.h>

int main()
{
    struct emp
    {
        char name[25];
        int age;
        float sal;
    };
    struct emp e[2];
    int i=    for(i=i<i++)
        scanf("%s %d %f", e[i].name, &e[i].age, &e[i].sal);

    for(i=i<i++)
        scanf("%s %d %f", e[i].name, e[i].age, e[i].sal);
    return}
Q.5.

Which of the following statement is True?

Q.6.

Which of the following statements correct about the below program?

#include<stdio.h>

int main()
{
    union a
    {
        int i;
        char ch[2];
    };
    union a u1 = {512};
    union a u2 = {2};
    return
}
1: u2 CANNOT be initialized as shown.
2: u1 can be initialized as shown.
3: To initialize char ch[] of u2 '.' operator should be used.
4: The code causes an error 'Declaration syntax error'
Q.7.

Point out the error in the program?

#include<stdio.h>
#include<string.h>
void modify(struct emp*);
struct emp
{
    char name[20];
    int age;
};
int main()
{
    struct emp e = {"Sanjay", 35};
    modify(&e);
    printf("%s %d", e.name, e.age);
    return}
void modify(struct emp *p)
{
     p ->age=p->age+}
Q.8.

The '.' operator can be used access structure elements using a structure variable.

Q.9.

Point out the error in the program?

#include<stdio.h>

int main()
{
    struct a
    {
        float category:        char scheme:    };
    printf("size=%d", sizeof(struct a));
    return}
Q.10.

What will be the output of the program ?

#include<stdio.h>

int main()
{
    enum days {MON=-TUE, WED=THU, FRI, SAT};
    printf("%d, %d, %d, %d, %d, %d\n", ++MON, TUE, WED, THU, FRI, SAT);
    return
}
Q.11.

What will be the output of the program ?

#include<stdio.h>

int main()
{
    enum status {pass, fail, absent};
    enum status studstudstud
    stud1 = pass;
    stud2 = absent;
    stud3 = fail;
    printf("%d %d %d\n", studstudstud3);
    return
}
Q.12.

Which of the following statements correctly assignsto month using pointer variable pdt?

#include<stdio.h>

    struct date
    {
        int day;
        int month;
        int year;
    };
int main()
{
    struct date d;
    struct date *pdt;
    pdt = &d;
    return}
Q.13.

Point out the error in the program in 16-bit platform?

#include<stdio.h>

int main()
{
    struct bits
    {
        int i:    }bit;

    printf("%d\n", sizeof(bit));
    return}
Q.14.

Union elements can be of different sizes.

Q.15.

Point out the error in the program?

struct emp
{
    int ecode;
    struct emp e;
};
Q.16.

What will be the output of the program ?

#include<stdio.h>

    struct course
    {
        int courseno;
        char coursename[25];
    };
int main()
{
    struct course c[] = { {"Java"}, 
                          {"PHP"}, 
                          {"DotNet"}     };

    printf("%d ", c[1].courseno);
    printf("%s\n", (*(c+2)).coursename);
    return}
Q.17.

What will be the output of the program ?

#include<stdio.h>

int main()
{
    int i=j=
    printf("%d, %d, %d\n", i|j&j|i, i|j&j|i, i^j);
    return
}
Q.18.

Which of the following statements correct about the below code?
maruti.engine.bolts=25;

Q.19.

Point out the error in the program?

#include<stdio.h>

int main()
{
    union a
    {
        int i;
        char ch[2];
    };
    union a z1 = {512};
    union a z2 = {2};
    return}
Q.20.

A structure can contain similar or dissimilar elements