When you are using SWITCH case, it is important to keep in mind that the inclusion of DEFAULT LABEL. This will inform you whether you are executing your program in right or wrong way. So, it is always recommended to use DEFAULT LABEL in the SWITCH st

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.

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.

Missing the inclusion of appropriate header file in c program will generate an error. Such a program may compile but the linker will given an error message as it will not be able to find the functions used in the program.

// AHF C PROGRAM SOLVING #include<stdio.h> #include<stdlib.h> #include<math.h> #define pf printf int main() { float x1=0.0,x2=2.0,value_x1,value_x2,mid_point=0.0,value_mid_point,error,divide,mul; pf("\nEnter the error: "); scanf("%f",&error); repeat_again: value_x1=(1 * pow(x1,2)) - (1 * x1 ) - 2; value_x2=(1 * pow(x2,2)) - (1 * x2 ) - 2; divide=(x2 - x1)/(value_x2 - value_x1); mul=(value_x1 * divide); mid_point= (x1 - mul); value_mid_point=(1 * pow(mid_point,2)) - (1 * mid_point ) - 2; if(value_x1 * value_x2 > 0 || value_x1 * value_mid_point == 0) { pf("\nno root"); goto end; } if(value_x1 * value_mid_point < 0) x2=mid_point; else x1=mid_point; //below line showing operation into repeat_again statement label //pf("\nmid_point: %f\nv_x1: %f\nv_x2: %f\nv_m: %f\nx1: %f\nx2: %f\na-v: %f\n\n\n",mid_point,value_x1,value_x2,value_mid_point,x1,x2,((x2-x1)/x2)); if(((x2-x1)/x2)<error) { pf("\nThe root is: %f",((x1+x2)/2.0)); goto end; } else goto repeat_again; end: exit(1); }

Enter the error: 0.001 no root

- Array 2_D - read and display ( 2 * 2 ) matrix
- Array_ print the smallest of N numbers
- Array_ interchange large and smallest number
- Array_ print largest and smallest number with position separately
- Array_ print second largest and smallest number with position separately
- Array_ input N number of digits and form a single number
- Array_ find duplicate number in a array
- Array 2_D - in small shop - there 5 salesman where each have to sall 3 products calculate ( 1 ) the total sales by each salesman and ( 2 ) total sales of each product
- Array 2_D - calculate marks of 5 students in 3 subject and display the highest marks in each subject
- Array 2_D - multiplication of two ( m * n ) matrix
- String_ compare two string
- String_ find any character with position
- String_ space count
- String_ find string length
- Array 2_D - transposed matrix

© 2018 - All rights reserved