1
GATE CSE 2024 Set 2
MCQ (More than One Correct Answer)
+1
-0.33
Consider the following C function definition.
int fX(char *a) {
char *b = a;
while(*b)
b++;
return b - a; }
Which of the following statements is/are TRUE?
2
GATE CSE 2022
MCQ (Single Correct Answer)
+1
-0.33
What is printed by the following ANSI C program?
#include <stdio.h>
int main(int argc, char *argv[ ]) {
int x = 1, z[2] = {10, 11};
int *p = NULL;
p = &x;
*p = 10;
p = &z[1];
*(&z[0] + 1) += 3;
printf("%d, %d, %d\n", x, z[0], z[1]);
return 0;
}
3
GATE CSE 2021 Set 2
MCQ (Single Correct Answer)
+1
-0.33
Consider the following ANSI C program.
#include<stdio.h>
int main(){
int arr[4][5];
int i, j;
for(i =0; i<4; i++){
for (j =0; j<5; j++){
arr [i][j] = 10*i + j;
}
}
print("%d", *(arr[1] + 9));
return 0;
}
What is the output of the above program?
4
GATE CSE 2019
Numerical
+1
-0.33
Consider the following C program :
The number that will be displayed on execution of the program is _______.
#include < stdio.h >
int main () {
int arr [] = {1,2,3,4,5,6,7,8,9,0,1,2,5}, *ip = arr+4;
printf ("%d\n", ip[1]);
return 0;
}
The number that will be displayed on execution of the program is _______.
Your input ____
Questions Asked from Pointer and Structure in C (Marks 1)
Number in Brackets after Paper Indicates No. of Questions
GATE CSE Subjects
Theory of Computation
Operating Systems
Algorithms
Database Management System
Data Structures
Computer Networks
Software Engineering
Compiler Design
Web Technologies
General Aptitude
Discrete Mathematics
Programming Languages