aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Computer Science (GATE Exam) 2003 - Previous Question Paper Solution
  • Consider the C program shown below. \#include \#define pr...
Multiple choice

Consider the C program shown below. #include <stdio.h> #define print(x) print f(”%d “, x) int x; void Q(int z) { z + = x; print (z); } void P(int *y) { int x = *y+2; Q(x); *y = x-1; Print (x); } Main (void) { x = 5; P (&x) Print (x); } The output of this program is

  1. 12 7 6

  2. 22 12 11

  3. 14 6 6

  4. 7 6 6

Reveal answer Fill a bubble to check yourself
A 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(...
  • 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...
  • #include void main() { int i=1; printf("%d",++i); printf("%d",i++); } choose output of the above program
  • What would be the output of the following? void main() { int z,x=5,y=-10,a=4,b=2; z=x++ - --y *b/a; printf(...
  • The following program prints main() { int i = 5; i = (++i) / (i ++); printf(“%d”,i); }
  • what is the output of the programme? #define ABC 20 #define XYZ 10 #define XXX ABC - XYZ void main() { int ...
  • What is the output of the following piece of code? int x = 3, y = 5, z; z = x + ++y; printf(“%d”,z);
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy