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 No correction required

B are not aware for

C must not to be aware for

D are not to be aware

E are not aware of

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

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

B Both are identical

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

B A variable that stores address of other variable

C A variable that stores address of an instruction

D All of the above

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 let

C ack

D ink

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 27

C 9

D 3

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

B x=31, y=502, z=502

C x=31, y=500, z=500

D x=31, y=504, z=504

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 MHello

B HMello

C Mello

D Hello

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, 4002, 4004

C 4000, 4004, 4008

D 4000, 4008, 4016