AD1

Monday, 9 January 2017

what will be the output of the following program


#include <stdio.h>
float x = 4.5 ;
int main( )
{
float y;
float f(float);
x*=2.0 ;
y=f(x) ;
printf("x=%f\ny=%f",x,y) ;
return 0;
}
float f(float a)
{
a+=1.3 ;
x-=4.5 ;
return(a+x) ;
}
view raw global.c hosted with ❤ by GitHub
x=4.5
y=14.8

No comments:

Post a Comment