Q.1

Are the following declarations same?

char far *far *scr;
char far far** scr;
  • Yes
  • No
Q.2

What will be the output of the program under DOS?

#include<stdio.h>

int main()
{
    char huge *near *far *ptr    char near *far *huge *ptr    char far *huge *near *ptr    printf("%d, %d, %d\n", sizeof(ptr1), sizeof(**ptr2), sizeof(ptr3));
    return}
  • 4, 4, 4
  • 4, 2, 2
  • 2, 8, 4
  • 2, 4, 8
Q.3

What will be the output of the program?

#include<stdio.h>

int main()
{
    struct s    {
        char *z;
    int i;
    struct s1 *p;
    };
    static struct s1 a[] = {{"Nagpur",a+, {"Chennai",a+, 
                            {"Bangalore",a} };

    struct s1 *ptr = a;
    printf("%s,", ++(ptr->z));
    printf(" %s,", a[(++ptr)->i].z);
    printf(" %s", a[--(ptr->p->i)].z);
    return
}
  • Nagpur, Chennai, Bangalore
  • agpur, hennai, angalore
  • agpur, Chennai, angalore
  • agpur, Bangalore, Bangalore
Q.4

What will be the output of the program?

#include<stdio.h>

int main()
{
    char huge *near *ptr
    char huge *far *ptr
    char huge *huge *ptr
    printf("%d, %d, %d\n", sizeof(ptr1), sizeof(ptr2), sizeof(ptr3));
    return
}
  • 4, 4, 8
  • 2, 4, 4
  • 4, 4, 2
  • 2, 4, 8
Q.5

What do the following declaration signify?

char **argv;
  • argv is a pointer to pointer.
  • argv is a pointer to a char pointer.
  • argv is a function pointer.
  • argv is a member of function pointer.
Q.6

Declare the following statement?
"A pointer to a function which receives an int pointer and returns float pointer".

  • float *(ptr)*int;
  • float *(*ptr)(int)
  • float *(*ptr)(int*)
  • float (*ptr)(int)
Q.7

Declare the following statement?
"An array of three pointers to chars".

  • char *ptr[3]();
  • char *ptr[3];
  • char (*ptr[3])();
  • char **ptr[3];
Q.8

What will be the output of the program in Turbo C?

#include<stdio.h>

int main()
{
    char near *near *ptr    char near *far *ptr    char near *huge *ptr    printf("%d, %d, %d\n", sizeof(ptr1), sizeof(ptr2), sizeof(ptr3));
    return}
  • 4, 4, 8
  • 4, 4, 4
  • 2, 4, 8
  • 2, 4, 4
Q.9

What do the following declaration signify?

char *scr;
  • scr is a pointer to pointer variable.
  • scr is a function pointer.
  • scr is a pointer to char.
  • scr is a member of function pointer.
Q.10

What do the following declaration signify?

void *cmp();
  • cmp is a pointer to an void type.
  • cmp is a void type pointer variable.
  • cmp is a function that return a void pointer.
  • cmp function returns nothing.
Q.11

What do the following declaration signify?

int *ptr[30];
  • ptr is a pointer to an array of 30 integer pointers.
  • ptr is a array of 30 pointers to integers.
  • ptr is a array of 30 integer pointers.
  • ptr is a array 30 pointers.
Q.12

Declare the following statement?
"A pointer to a function which receives nothing and returns nothing".

  • void *(ptr)*int;
  • void *(*ptr)()
  • void *(*ptr)(*)
  • void (*ptr)()
Q.13

Declare the following statement?
"A pointer to an array of three chars".

  • char *ptr[3]();
  • char (*ptr)*[3];
  • char (*ptr[3])();
  • char (*ptr)[3];
Q.14

What do the following declaration signify?

char *arr[10];
  • arr is a array of 10 character pointers.
  • arr is a array of function pointer.
  • arr is a array of characters.
  • arr is a pointer to array of characters.
Q.15

What do the following declaration signify?

int *f();
  • f is a pointer variable of function type.
  • f is a function returning pointer to an int.
  • f is a function pointer.
  • f is a simple declaration of pointer variable.
Q.16

What do the following declaration signify?

int (*pf)();
  • pf is a pointer to function.
  • pf is a function pointer.
  • pf is a pointer to a function which return int
  • pf is a function of pointer variable.
Q.17

What do the following declaration signify?

void (*cmp)();
  • cmp is a pointer to an void function type.
  • cmp is a void type pointer function.
  • cmp is a function that return a void pointer.
  • cmp is a pointer to a function which returns void .
0 h : 0 m : 1 s