Pointer MCQs
Practice free Pointer multiple-choice questions with instant answer feedback and step-by-step solutions. Click an option to check yourself, reveal the full explanation, and work through all 253 questions — no login required.
Question 163easy
What will be the output of the following C code?
#include <stdio.h>
void main()
{
char a[10][5] = {"hi", "hello", "fellows"};
printf("%p\n", a);
printf("%p", a[0]);
}Question 164easy
What will be the output of the following C code on a 32-bit system?
#include <stdio.h>
void main()
{
char *a[10] = {"hi", "hello", "how"};
printf("%d\n", sizeof(a[1]));
}Question 165easy
What will be the output of the following C code?
#include <stdio.h>
void f(int a[2][])
{
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);
}Advertisement
Question 166easy
What will be the output of the following C code?
#include <stdio.h>
int mul(int a, int b, int c)
{
return a * b * c;
}
void main()
{
int *function_pointer;
function_pointer = mul;
printf("The product of three numbers is:%d",
function_pointer(2, 3, 4));
}Question 167easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int ary[4] = {1, 2, 3, 4};
int *p = ary + 3;
printf("%d\n", p[-2]);
}Question 168easy
What will be the output of the following C code?
#include <stdio.h>
int x = 0;
void main()
{
int *ptr = &x
printf("%p\n", ptr);
x++;
printf("%p\n ", ptr);
}Advertisement
Question 169easy
Which of the following is not possible in C?
Question 170easy
What will be the output of the following C code?
#include <stdio.h>
struct student
{
int no = 5;
char name[20];
};
void main()
{
struct student s;
s.no = 8;
printf("hello");
}Question 171easy
Which of the following can never be sent by call-by-value?