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 are not aware of

C must not to be aware for

D No correction required

E are not to be aware

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

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

B Both are identical

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

D None of these

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 A keyword used to create variables

B All of the above

C A variable that stores address of an instruction

D A variable that stores address of other variable

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 ite

B ink

C let

D ack

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 30

B 3

C 27

D 9

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=498, z=498

C x=31, y=502, z=502

D x=31, y=500, z=500

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

B 4000, 4008, 4016

C 4000, 4004, 4008

D 4000, 4002, 4004