image not found

Oops! That page can't be found.


Directions to Solve

Which of phrases given below each sentence should replace the phrase printed in bold type to make the grammatically correct? If the sentence is correct as it is, mark 'E' as the answer.

Q1: We demonstrated to them how we were prepared the artistic patterns.

A are preparing

B are prepared

C had prepared

D have prepared

E No correction required

Q2:
What will be the output of the program?
#include<stdio.h>
int main()
{
    int X=40;
    {
        int X=20;
        printf('%d ', X);
    }
    printf('%d\n', X);
    return 0;
}

A 20 40

B Error

C 40 40

D 20

Q3: What will be the output of the program ?
#include<stdio.h>

int main()
{
    enum status {pass, fail, absent};
    enum status stud1, stud2, stud3;
    stud1 = pass;
    stud2 = absent;
    stud3 = fail;
    printf('%d %d %d\n', stud1, stud2, stud3);
    return 0;
}

A 0, 2, 1

B 0, 1, 2

C 1, 2, 3

D 1, 3, 2

Q4:
What will be the output of the program ?
#include<stdio.h>

int main()
{
    int i=4, j=8;
    printf("%d, %d, %d\n", i|j&j|i, i|j&j|i, i^j);
    return 0;
}

A 112, 1, 12

B -64, 1, 12

C 32, 1, 12

D 12, 12, 12

Q5:
What will be the output of the program in Turbo C (under DOS)?
#include<stdio.h>

int main()
{
    struct emp
    {
        char *n;
        int age;
    };
    struct emp e1 = {"Dravid", 23};
    struct emp e2 = e1;
    strupr(e2.n);
    printf("%s\n", e1.n);
    return 0;
}

A Error: Invalid structure assignment

B Dravid

C No output

D DRAVID

Q6: What will be the output of the program in 16-bit platform (under DOS)?
#include<stdio.h>

int main()
{
    struct node
    {
        int data;
        struct node *link;
    };
    struct node *p, *q;
    p = (struct node *) malloc(sizeof(struct node));
    q = (struct node *) malloc(sizeof(struct node));
    printf('%d, %d\n', sizeof(p), sizeof(q));
    return 0;
}

A 8, 8

B 2, 2

C 5, 5

D 4, 4

Q7: What will be the output of the program ?
#include<stdio.h>

int main()
{
    struct byte
    {
        int one:1;
    };
    struct byte var = {1};
    printf('%d\n', var.one);
    return 0;
}

A 1

B -1

C Error

D 0

Q8:
What will be the output of the program ?
#include<stdio.h>

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

A 0, 1, 6, 3, 4, 5

B 0, 0, 6, 7, 8, 9

C -1, 0, 1, 2, 3, 4

D Error

Q9:
What will be the output of the program ?
#include<stdio.h>

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

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

A 104 DotNet

B 102 Java

C 103 PHP

D 103 DotNet

Q10:
What will be the output of the program given below in 16-bit platform ?
#include<stdio.h>

int main()
{
    enum value{VAL1=0, VAL2, VAL3, VAL4, VAL5} var;
    printf("%d\n", sizeof(var));
    return 0;
}

A 2

B 1

C 4

D 10