Free Practice / PYQ

GATE CSE C Programming Practice Test – Array & Pointer | Set 1

Questions 1-5 of 100

Your score 0/100 0 answered
Correct 0 Incorrect 0 Unanswered 100 Accuracy 0%

Question 1

MCQ · Single Correct 1 mark

Consider the following 2D array declaration in C:

unsigned int x[4][3] = {{10, 20, 30}, {40, 50, 60}, {70, 80, 90}, {100, 110, 120}};

Assuming the base address of x is 2000 in decimal and an unsigned integer occupies 4 bytes of memory, what are the values printed by 'printf("%u, %u, %u", x + 3, *(x + 3), *(x + 2) + 3);'?

Answers for question 1

💡 Right-click an option to strike it out

Question 2

MCQ · Single Correct 1 mark

Given the declaration 'int (*p)[5];', what is the exact type and meaning of 'p'?

Answers for question 2

💡 Right-click an option to strike it out

Question 3

MCQ · Single Correct 1 mark

What is the output of the following C code snippet?

C
#include <stdio.h>
int main(void) {
    int arr[] = {10, 20, 30, 40, 50};
    int *ptr = arr;
    printf("%d ", *ptr++);
    printf("%d", *ptr);
    return 0;
}
Answers for question 3

💡 Right-click an option to strike it out

Question 4

MCQ · Single Correct 1 mark

Consider the declaration 'int *p[5];'. What does this statement define?

Answers for question 4

💡 Right-click an option to strike it out

Question 5

MCQ · Single Correct 1 mark

What is the output of the following C code?

C
#include <stdio.h>
int main(void) {
    char str[] = "GATE2026";
    char *p = str;
    printf("%s", p + 4);
    return 0;
}
Answers for question 5

💡 Right-click an option to strike it out

Scroll to Top