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

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.

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.

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.

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 FUNCTION

#include<stdio.h> #include<math.h> #define pf printf //function declaration float fact(float a, float b, float c, float d); void main() { float x1,x2,y1,y2,res; pf("Enter the value of x1,x2,y1,y2: "); scanf("%f %f %f %f",&x1,&x2,&y1,&y2); //function call res=fact(x1,x2,y1,y2); pf("\nAREA= %f",res); return 0; } //function definition float fact(float a, float b, float c, float d) //function header //function body { float l,w,p; l=sqrt(pow((b-a),2)+pow((d-c),2)); w=sqrt(pow((b-a),2)+pow((d-c),2)); p=l*w; return p; //return answer }

Enter the value of x1,x2,y1,y2: 2 4 5 6 AREA= 5.000000

- Array 2_D - read and display ( 2 * 2 ) matrix
- Array 2_D - subtraction of two ( m x n ) matrix
- Array 2_D - summation of two ( m * n ) matrix
- Array 2_D - transposed matrix
- Array_ insertion
- Array_ deletion
- Array_ merging
- Function_ find divisible number
- Function_ convert given total-time into minutes
- Function_ convert positive to negative and vice versa
- Function_ find if triangle or not
- Function_ general instruction for cleaning room by robot
- Function_ a equation for finding velocity and distance

© 2018 - All rights reserved