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 have prepared

D No correction required

E had prepared

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 40 40

C 20

D Error

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

C 32, 1, 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 No output

C Dravid

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

B 4, 4

C 5, 5

D 2, 2

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 Error

C 0

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 Error

B -1, 0, 1, 2, 3, 4

C 0, 0, 6, 7, 8, 9

D 0, 1, 6, 3, 4, 5

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 103 PHP

B 102 Java

C 103 DotNet

D 104 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 4

B 2

C 10

D 1