Last Updated :
20 Feb, 2019
What will be the output of the following code?
#include <stdio.h>
void fun(int *ptr)
{
*ptr = 30;
}
int main()
{
int x = 20;
fun(&x);
printf(\"x = %d\", x);
return 0;
}
(A) x = 20
(B) x = 30
(C) Error
(D) None of these
Answer: (B)
Explanation:
Quiz of this Question
Share your thoughts in the comments
Please Login to comment...