AD1

Wednesday, 4 January 2017

what is the output of the following program


#include <stdio.h>
int add(int x,int y,int z)
{
printf("%d\n",x+y+z);
return;
}
int main()
{
add(2,3,5);
int x=add(2,3,5);
printf("%d",x);
return 0;
}
view raw garbage.c hosted with ❤ by GitHub
10
10
garbage value
if your function does not return any value , it must be declared as void

No comments:

Post a Comment