92.
What will be the output of the following C code (considering sizeof char is 1 and pointer is 4)?
#include <stdio.h>
int main()
{
    char *a[2] = {"hello", "hi"};
    printf("%d", sizeof(a));
    return 0;
}

94.
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    char *p[1] = {"hello"};
    printf("%s", (p)[0]);
    return 0;
}

95.
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    int a[3] = {1, 2, 3};
    int *p = a;
    int *r = &p;
    printf("%d", (**r));
}

96.
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    char *str = "hello world";
    char strary[] = "hello world";
    printf("%d %d\n", sizeof(str), sizeof(strary));
    return 0;
}

98.
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int a[4] = {1, 2, 3, 4};
    int b[4] = {1, 2, 3, 4};
    int n = &b[3] - &a[2];
    printf("%d\n", n);
}

99.
What will be the output of the following C code?
#include <stdio.h>
void f(int a[][3])
{
    a[0][1] = 3;
    int i = 0, j = 0;
    for (i = 0; i < 2; i++)
    for (j = 0; j < 3; j++)
    printf("%d", a[i][j]);
}
void main()
{
    int a[2][3] = {0};
    f(a);
}

100.
What will be the output of the following C code?
#include <stdio.h>
void (*(f)())(int, float);
typedef void (*(*x)())(int, float);
void foo(int i, float f);
int main()
{
    x = f;
    x();
}
void (*(f)())(int, float)
{
    return foo;
}
void foo(int i, float f)
{
    printf("%d %f\n", i, f);
}

Read More Section(Pointer)

Each Section contains maximum 100 MCQs question on Pointer. To get more questions visit other sections.