71.
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int i = 10;
    void *p = &i;
    printf("%d\n", (int)*p);
    return 0;
}

72.
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    char *a[10] = {"hi", "hello", "how"};
    int i = 0;
    for (i = 0;i < 10; i++)
    printf("%s", *(a[i]));
}

73.
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    const int ary[4] = {1, 2, 3, 4};
    int *p;
    p = ary + 3;
    *p = 5;
    printf("%d\n", ary[3]);
}

74.
What will be the output of the following C code?
#include <stdio.h>
void foo( int[] );
int main()
{
    int ary[4] = {1, 2, 3, 4};
    foo(ary);
    printf("%d ", ary[0]);
}
void foo(int p[4])
{
    int i = 10;
    p = &i;
    printf("%d ", p[0]);
}

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

77.
Comment on an array of the void data type.

79.
What will be the output of the following C code (run without any command line arguments)?
#include <stdio.h>
int main(int argc, char *argv[])
{
    while (*argv  !=  NULL)
    printf("%s\n", *(argv++));
    return 0;
}

80.
What will be the output of the following C code?
#include <stdio.h>
void m(int *p)
{
    int i = 0;
    for(i = 0;i < 5; i++)
    printf("%d\t", p[i]);
}
void main()
{
    int a[5] = {6, 5, 3};
    m(&a);
}

Read More Section(Pointer)

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