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

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.

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 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.

// AHF C PROGRAM SOLVING //The problem are solving here using FUNCTION

#include<stdio.h> #include<math.h> #define pf printf //function declaration int r(int); int reveres(int n); void main() { int x,rev,res; printf("Enter any integer number: "); scanf("%d",&x); //function call rev=reveres(x); res=r(x); printf("\nMaximum digit of the given integer is: %d",rev); printf("\nMinimum digit of the given integer is: %d",res); return 0; } //definition of the first function int reveres(int n) //function header //function body { int temp,large=-1; while(n!=0) { temp=n%10; //separating each digit of the given integer large=temp>large?temp:large; //taking large number n/=10; //update loop } return large; } //definition of second function int r(int n) //function header //function body { int temp,min=10; while(n!=0) { temp=n%10; //separating each digit of the given integer min=temp<min?temp:min; //taking large number n/=10; //update loop } return min; }

Enter any integer number: 1234 Maximum digit of the given integer is: 4 Minimum digit of the given integer is: 1

- find two same integer constant
- A general instruction for cleaning room by a robot
- Input any number and find color name
- Given four co-ordinates and find the area of a rectangle
- Given number is square able or not
- Enter positive number and convert negative number and vice versa
- Profit or loss on selling goods
- Calculate area and circumference of circle
- In a integer, count digits,sum of digits,reverse the integer and print even and odd digits of the integer
- Function_ area of a triangle
- Function_ area of a rectangle
- Function_ area of a circle
- Function_ average of given input
- Function_ calculate factorial

© 2018 - All rights reserved