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 prepared

B have prepared

C had prepared

D No correction required

E are preparing

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

B Error

C 40 40

D 20 40

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 1, 2, 3

B 0, 1, 2

C 1, 3, 2

D 0, 2, 1

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 32, 1, 12

C 12, 12, 12

D -64, 1, 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 DRAVID

B Dravid

C No output

D Error: Invalid structure assignment

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 4, 4

B 5, 5

C 2, 2

D 8, 8

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 Error

B 0

C -1

D 1

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 Error

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

D 0, 0, 6, 7, 8, 9

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 102 Java

B 103 DotNet

C 104 DotNet

D 103 PHP

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 4

C 1

D 10