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: They are not beware of all the facts

A are not aware for

B No correction required

C are not aware of

D must not to be aware for

E are not to be aware

Q2:
Is there any difference between following declarations?
1 : extern int fun();
2 : int fun();

A Both are identical

B
No difference, except extern int fun(); is probably in another file

C None of these

D
int fun(); is overrided with extern int fun();

Q3: What would be the equivalent pointer expression for referring the array element a[i][j][k][l]

A (((a+i)+j)+k+l)

B ((((a+i)+j)+k)+l)

C *(*(*(*(a+i)+j)+k)+l)

D ((a+i)+j+k+l)

Q4: A pointer is

A All of the above

B A variable that stores address of an instruction

C A variable that stores address of other variable

D A keyword used to create variables

Q5: The operator used to get value at address stored in a pointer variable is

A &

B *

C &&

D ||

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

int main()
{
    static char *s[] = {"black", "white", "pink", "violet"};
    char **ptr[] = {s+3, s+2, s+1, s}, ***p;
    p = ptr;
    ++p;
    printf("%s", **p+1);
    return 0;
}

A ink

B ack

C let

D ite

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

int main()
{
    int i=3, *j, k;
    j = &i;
    printf("%d\n", i**j*i+*j);
    return 0;
}

A 27

B 9

C 3

D 30

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

int main()
{
    int x=30, *y, *z;
    y=&x; /* Assume address of x is 500 and integer is 4 byte size */
    z=y;
    *y++=*z++;
    x++;
    printf("x=%d, y=%d, z=%d\n", x, y, z);
    return 0;
}

A x=31, y=504, z=504

B x=31, y=500, z=500

C x=31, y=498, z=498

D x=31, y=502, z=502

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

int main()
{
    char str[20] = "Hello";
    char *const p=str;
    *p='M';
    printf("%s\n", str);
    return 0;
}

A Mello

B Hello

C HMello

D MHello

Q10: What will be the output of the program If the integer is 4bytes long?
#include<stdio.h>

int main()
{
    int ***r, **q, *p, i=8;
    p = &i;
    q = &p;
    r = &q;
    printf("%d, %d, %d\n", *p, **q, ***r);
    return 0;
}

A 4000, 4004, 4008

B 8, 8, 8

C 4000, 4002, 4004

D 4000, 4008, 4016