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
No difference, except extern int fun(); is probably in another file

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

C None of these

D Both are identical

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 variable that stores address of other variable

B A variable that stores address of an instruction

C All of the above

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 let

B ack

C ink

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 9

B 30

C 27

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

B x=31, y=498, z=498

C x=31, y=504, z=504

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 MHello

D HMello

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

B 4000, 4004, 4008

C 4000, 4008, 4016

D 8, 8, 8