aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Computer Science (GATE Exam) 2010 - Previous Question Paper Solution
  • What does the following program print? ```c #include void...
Multiple choice

What does the following program print?

#include 
void f (int *p, int * g) 
{
        p = q;
        * p = 2;
}
int i = 0, j = 1;
int main ( )
{
f(&i, &j);
print f ("%d%d  n", i, j) ;
return 0;
}

  1. 2 2

  2. 2 1

  3. 0 1

  4. 0 2

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Keep practicing — related questions

  • Consider the C program shown below. #include < stdio.h > #define print(x) print f(” % d“, x) int x; void Q(...
  • Consider the C program shown below. \#include <stdio.h> \#define print(x) print f(”%d “, x) int x; void Q(i...
  • Consider the program below: #include int fun(int n, int *f_p) { int t, f; if (n <= 1) { *f_p = 1; return 1;...
  • What is the value printed by the following C program? #include int f(int * a, int n) { if (n <= 0) return 0...
  • #include void main() { int i=1; printf("%d",++i); printf("%d",i++); } choose output of the above program
  • What is printed by the following C program? int f(int x, int *py, int **ppz) void main() { { Int y, z; int ...
  • What is printed by the following C program? int f(int x, int py, int **ppz) void main() { { Int y, z; int c...
  • What will be the output of the following program? void main() { int val=1234; int* ptr=&val; printf("%d %d"...
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy