Q.1

Which of the statements is correct about the program?

#include<stdio.h>

int main()
{
    float a=3.    char *j;
    j = (char*)&a;
    printf("%d\n", *j);
    return}
  • It prints ASCII value of the binary number present in the first byte of a float variable a.
  • It prints character equivalent of the binary number present in the first byte of a float variable a.
  • It will print 3
  • It will print a garbage value
Q.2

The following program reports an error on compilation.

#include<stdio.h>
int main()
{
    float i=*j;
    void *k;
    k=&i;
    j=k;
    printf("%f\n", *j);
    return}
  • True
  • False
Q.3

Is the NULL pointer same as an uninitialised pointer?

  • Yes
  • No
Q.4

What will be the output of the program ?

#include<stdio.h>

int main()
{
    char str1[] = "India";
    char str2[] = "BIX";
    char *s1 = str*s2=str    while(*s1++ = *s2++)
        printf("%s", str1);

    printf("\n");
    return}
  • IndiaBIX
  • BndiaBIdiaBIXia
  • India
  • (null)
Q.5

What will be the output of the program If the integer is 4bytes long?

#include<stdio.h>

int main()
{
    int ***r, **q, *p, i=
    p = &i;
    q = &p;
    r = &q;
    printf("%d, %d, %d\n", *p, **q, ***r);
    return
}
  • 8, 8, 8
  • 4000, 4002, 4004
  • 4000, 4004, 4008
  • 4000, 4008, 4016
Q.6

In the following program add a statement in the function fun() such that address of a gets stored in j?

#include<stdio.h>
int main()
{
    int *j;
    void fun(int**);
    fun(&j);
    return}
void fun(int **k)
{
    int a=    /* Add a statement here */
}
  • **k=a;
  • k=&a;
  • *k=&a
  • &k=*a
Q.7

Are the three declarations char **apple, char *apple[], and char apple[][] same?

  • True
  • False
Q.8

Will the program compile in Turbo C?

#include<stdio.h>
int main()
{
    int a=*j;
    void *k;
    j=k=&a;
    j++;
    k++;
    printf("%u %u\n", j, k);
    return}
  • Yes
  • No
Q.9

Which of the following statements correct about k used in the below statement?
char ****k;

  • k is a pointer to a pointer to a pointer to a char
  • k is a pointer to a pointer to a pointer to a pointer to a char
  • k is a pointer to a char pointer
  • k is a pointer to a pointer to a char
Q.10

Will the following program give any warning on compilation in TurboC (under DOS)?

#include<stdio.h>

int main()
{
    int *pi=    void *p    p1=&i;
    p2=&i;
    p1=p    p2=p    return}
  • Yes
  • No
0 h : 0 m : 1 s