Sunday, March 13, 2011

Add float pointer variable in C

#include "stdio.h"

int main()
{
float myVar=0;
float fVal = 5.5;
float *pFloat;
pFloat = &fVal;

myVar = myVar + *pFloat;

printf("%f\n", myVar);

return 0;
}

OUTPUT:

5.500000
Press any key to continue . . .

No comments:

Post a Comment