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.

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.

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.

// AHF C PROGRAM SOLVING //solving here basic type of programming problem

#include<stdio.h> #include<math.h> #define pf printf int main() { int a; pf("\nEnter any number: "); scanf("%d",&a); if (a>0) { pf("\nThe number is positive."); } else if(a>0) { pf("\nThe number is negative."); } else pf("\nThe value is equal to zero."); return 0; }

Enter any number: 6

The number is positive.

Enter any number: -1

The number is negative.

Enter any number: 0

The value is equal to zero.

The number is positive.

Enter any number: -1

The number is negative.

Enter any number: 0

The value is equal to zero.

- Eligible age for vote
- Calculate area of a circle
- Calculate area of a triangle
- Calculate area of a rectangle
- Calculate area of a rectangle, triangle and circle
- Bonus on employment salary
- Print even or odd number
- Leap year
- Input any key from key-board and display key's feature
- Find large number of two or three given numbers
- Print ASCII value of a character and number
- Print all ASCII value
- 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

© 2018 - All rights reserved