GATE Exam | Aptitude Questions | GATE Syllabus | GATE Result | Mock Test | GATE Preparation
0 votes

What does the following program print?

#include<stdio.h>

void f(int *p, int *q)

{

  p = q;

 *p = 2;

}

int i = 0, j = 1;

int main()

{

  f(&i, &j);

  printf("%d %d \n", i, j);

  getchar();

  return 0;

}

(A) 2 2
(B) 2 1
(C) 0 1
(D) 0 2

asked in c programming by gate

Related questions

The best answer to any question