Q.1.

What would be the equivalent pointer expression for referring the array element a[i][j][k][l]

Q.2.

What is (void*)0?

Q.3.

What will be the output of the program?

#include<stdio.h>

int main()
{
    int arr[2][2][= {8};
    int *p, *q;
    p = &arr[1][1][1];
    q = (int*) arr;
    printf("%d, %d\n", *p, *q);
    return
}
Q.4.

What will be the output of the program ?

#include<stdio.h>
#include<string.h>

int main()
{
    int i, n;
    char *x="Alice";
    n = strlen(x);
    *x = x[n];
    for(i=i<=n; i++)
    {
        printf("%s ", x);
        x++;
    }
    printf("\n", x);
    return}
Q.5.

A pointer is

Q.6.

Can you combine the following two statements into one?

char *p;
p = (char*) malloc(100);
Q.7.

What will be the output of the program assuming that the array begins at the locationand size of an integer is 4 bytes?

#include<stdio.h>

int main()
{
    int a[3][= {};
    printf("%u, %u, %u\n", a[0]+*(a[0]+1), *(*(a+0)+1));
    return
}
Q.8.

What will be the output of the program ?

#include<stdio.h>

int main()
{
    int i, a[] = {10};
    change(a, 5);
    for(i=i<=i++)
        printf("%d, ", a[i]);
    return}
void change(int *b, int n)
{
    int i;
    for(i=i<n; i++)
        *(b+= *(b+i)+}
Q.9.

What will be the output of the program ?

#include<stdio.h>

void fun(void *p);
int i;

int main()
{
    void *vptr;
    vptr = &i;
    fun(vptr);
    return
}
void fun(void *p)
{
    int **q;
    q = (int**)&p;
    printf("%d\n", **q);
}
Q.10.

The operator used to get value at address stored in a pointer variable is

Q.11.

In which header file is the NULL macro defined?

Q.12.

What will be the output of the program?

#include<stdio.h>

int main()
{
    int arr[= {4};
    char *p;
    p = arr;
    p = (char*)((int*)(p));
    printf("%d, ", *p);
    p = (int*)(p+1);
    printf("%d", *p);
    return
}
Q.13.

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

#include<stdio.h>

int main()
{
    int arr[] = {16};
    printf("%d, %d, %d\n", sizeof(arr), sizeof(*arr), sizeof(arr[0]));
    return}
Q.14.

What will be the output of the program ?

#include<stdio.h>

int main()
{
    char *str;
    str = "%s";
    printf(str, "K\n");
    return}
Q.15.

How many bytes are occupied by near, far and huge pointers (DOS)?

Q.16.

What will be the output of the program ?

#include<stdio.h>

int main()
{
    char *str;
    str = "%d\n";
    str++;
    str++;
    printf(str-300);
    return}
Q.17.

What will be the output of the program ?

#include<stdio.h>
int *check(static int, static int);

int main()
{
    int *c;
    c = check(20);
    printf("%d\n", c);
    return}
int *check(static int i, static int j)
{
    int *p, *q;
    p = &i;
    q = &j;
    if(i >=        return (p);
    else
        return (q);
}
Q.18.

What will be the output of the program ?

#include<stdio.h>

int main()
{
    char str[] = "peace";
    char *s = str;
    printf("%s\n", s++ +3);
    return}
Q.19.

What will be the output of the program ?

#include<stdio.h>

int main()
{
    static char *s[] = {"black", "white", "pink", "violet"};
    char **ptr[] = {s+s+s+s}, ***p;
    p = ptr;
    ++p;
    printf("%s", **p+1);
    return}
Q.20.

Point out the compile time error in the program given below.

#include<stdio.h>

int main()
{
    int *x;
    *x=    return}