Showing posts with label Add float pointer variable in C. Show all posts
Showing posts with label Add float pointer variable in C. Show all posts

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 . . .