What will be the output of following code?
//Assume necessary header files are present
#include<stdio.h>
void task(int a);
int main()
{
int a=2;
task(a);
printf("%d",a);
return 0;
}
void task(int a)
{
a=a+1;
}
A. 2
B. 3
C.0
D. Garbage value
Answers
Answered by
0
Answer:
answer will be 2 because pointer is not passed only value
Similar questions