Warning: implode(): Invalid arguments passed in /www/wwwroot/jobquiz.info/mdiscuss.php on line 336 Functions cannot return a floating point number ?->(Show Answer!)
1. Functions cannot return a floating point number
Ask Your Doubts Here
Comments
By: guest on 01 Jun 2017 06.01 pm
A function can return floating point value. Example: #include <stdio.h> float sub(float, float); /* Function prototype */ int main() { float a = 4.5, b = 3.2, c; c = sub(a, b); printf("c = %f\n", c); return 0; } float sub(float a, float b) { return (a - b); } Output:
c = 1.300000
c = 1.300000