NEW
New Website Launch
Experience the best way to solve previous year questions with mock tests (very detailed analysis), bookmark your favourite questions, practice etc...
VISIT NOW

GATE CSE

Pointer and Structure in C

Programming Languages

Previous Years Questions

Marks 1

More
What is printed by the following ANSI C program? #include <stdio.h> int main(int argc, char *argv[ ]) { int x...
GATE CSE 2022
Consider the following C program : #include < stdio.h > int main () { int arr [] = {1,2,3,4,5,6,7,8,...
GATE CSE 2019
Consider the following C program. #include< stdio.h > struct Ournode{ char x,y,z; }; int main(){ struct Ournode ...
GATE CSE 2018
Consider the following C program. #include < stdio.h > void mystery(int *ptra, int *ptrb) { int *temp; ...
GATE CSE 2016 Set 1
Consider the following C program void f(int, short); void main() { int i = 100; short s = 12; short *p = &am...
GATE CSE 2016 Set 1
The output of the following C program is__________. void f1(int a, int b) { int c; c=a; a=b; b=c; } void f2(int *a,...
GATE CSE 2015 Set 1
What does the following fragment of C-program print? char c[ ] = "GATE2011"; char *p = c; printf("%s", p + p[3] - p[1]);...
GATE CSE 2011
What does the following program print? #include < stdio.h > void f (int *p, int *q) { p = q; *p = 2; } in...
GATE CSE 2010
What does the following C statement declare? int (*f)(int *);
GATE CSE 2005
Consider the following C function: void swap (int a, int b) { int temp; temp = a; a = b; b = temp; } In orde...
GATE CSE 2004
Assume the following C variable declaration int * A[10], B[10][10]; Of the following expressions I. A[2] II. A[2] [3] II...
GATE CSE 2003
Consider the following C declaration struct { short s[5]; union { float y; long z; } u; }t...
GATE CSE 2000
The most appropriate matching for the following pairs X: m=malloc(5); m= NULL; Y: free(n); n->value = 5; Z: char *p...
GATE CSE 2000
The following C declarations struct node{ int i: float j; }; struct node *s[10]; define s to be...
GATE CSE 2000

Marks 2

More
Consider the following C program: #include < stdio.h > int main() { int a[] = {2, ...
GATE CSE 2019
Consider the following C program: #include< stdio.h > void fun1(char *s1, char *s2){ char *tmp; tmp = s1; s1...
GATE CSE 2018
What is the output of the following C code? Assume that the address of x is 2000 (in decimal) and an integer requires fo...
GATE CSE 2015 Set 1
Consider the following C code segment. int a, b, c = 0; void prtFun(void); main( ) { static int a = 1; /* Line 1 */ ...
GATE CSE 2012
Consider the following C code segment. int a, b, c = 0; void prtFun(void); main( ) { static int a = 1; /* Line 1 */ ...
GATE CSE 2012
What is printed by the following C program? #include < stdio.h > int f(int x, int *py, int **ppz) { int y, z; ...
GATE CSE 2008
Consider this C code to swap two integers and these five statements: void swap(int *px, int *py) { *px = *px - *py...
GATE CSE 2006
Consider the following C program segment: char p[20]; char *s = "string"; int length = strlen(s); for(i=0; i < length...
GATE CSE 2004
Consider the C program shown below. #include < stdio.h > #define print(x) printf("%d ", x) int x; void Q(int z) { ...
GATE CSE 2003
Consider the following three C functions: [P1] int*g(void) { int x=10; return(&x); } [P2] i...
GATE CSE 2001

Marks 5

More
Consider the following C program: void abc(char *s) { if(s[0]=='\0') return; abc(s+1); abc(s+1); printf("%c"...
GATE CSE 2001

Joint Entrance Examination

JEE Main JEE Advanced WB JEE

Graduate Aptitude Test in Engineering

GATE CSE GATE ECE GATE EE GATE ME GATE CE GATE PI GATE IN

Medical

NEET

CBSE

Class 12