Semoclone ( ; ) is one of the best sensitive symbols in programming. Placing a semicolon ( ; ) after the WHILE or FOR loop is not a syntax error. So it will not be reported by the compiler. However, it is considered to be a logical error as it change
Specifier is a typedef-name and a very sensitive in C programming. Using an incorrect specifier for the data type being read or written will generate a run time error.
The iterative statement is one of the most important and interesting statements in the programming world. An iterative statement is used to repeat the execution of a list of statements, depending on the value of an integer expression.
The test expression done on exact statement. The good habit of using test expression on exact or fulfill statement. So do not use floating point numbers for checking for equality in the test expression.
Not putting // before the start of single statement comment is a compiler error. Not putting the */ after the termination of block comment is a compiler error.
// AHF C PROGRAM SOLVING //The problem are solving here using FUNCTIONOUTPUT:
#include<stdio.h> #include<math.h> #define pf printf //function declaration float circle(float x); int main() { float a; float result; pf("Enter the radius : "); scanf("%d",&a); //function call result=circle(a); pf("\nThe area of the circle is %.2f",result); return 0; } //function definition float circle(float x) //function header //function body { return (3.1416*x*x); //return answer }
Enter the radius : 2.5 The area of the circle is : 19.64