Skip to content
Related Articles

Related Articles

Improve Article

GATE | Sudo GATE 2020 Mock III (24 January 2019) | Question 53

  • Last Updated : 23 Jan, 2020

The value printed by the following program is _________ .

void f(int* p, int m) 
{ 
    m = m - 5; 
    *p = *p - m; 
    return; 
} 
void main() 
{ 
    int i=10, j=5; 
    f(&i, j); 
    printf("%d", i+j); 
} 

(A) 5
(B) 25
(C) 15
(D) 30


Answer: (C)

Explanation: Option (C) 15 is correct.




#include<stdio.h>
  
void f(int* p, int m) 
    m = m - 5; 
    *p = *p - m; 
    return
void main() 
    int i=10, j=5; 
    f(&i, j); 
    printf("%d", i+j); 


Quiz of this Question

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

My Personal Notes arrow_drop_up
Recommended Articles
Page :