Chap. 1 : Unit 6 : Sample C Program : Part 5

Here we will write one more program of calculating area of a circle. The idea of this program is to understand defining proper data types of variables in a C program. 

Here we need at least 2 variables. One for storing radius of a circle and other one for storing area of the circle. The data type of radius may be an integer or float but as formula of circle contains constant of PI which is 3.14, a floating point constant, the area variable must be declared as float or double to store the value. 

Access this framework with lot more stuff like C language MCQ, viva and interview preparation, Glossary, Solved Programs of C language etc. please register free (log in ) on Register / Login

cenglishcppengcmarathi

Leave a Reply