Home / Programs / floating point constant in c programming language
Programming Example

floating point constant in c programming language

👁 1,137 Views
💻 Practical Program
📘 Step by Step Learning
floating point constant in c programming language

Program Code

#include"stdio.h" 
int main()
{
const float a=2.0; // a is float point constant
printf("%f \n",a);   
return 0;
} 

Output

2.000000
Press any key to continue . . .

How to learn from this program

First read the algorithm, then study the program code line by line. After that, compare the code with the output and finally go through the explanation. This approach helps learners understand both the logic and the implementation properly.