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

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.

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.

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 int fact(int year, int x); void main() { int a,res,m; pf("Enter first number: "); scanf("%d",&a); pf("\nEnter the second number: "); scanf("%d",&m); //function call res=fact(a,m); return 0; } //function definition int fact(int year, int x) //function header //function body { int i; for(i=year;i<=x;i++) { if(i%4 == 0) { if(i%100 == 0) //checking censure year { if(i%400 == 0) pf("\n%d is leap year.",i); else pf("\n%d is not leap year.",i); } else pf("\n%d is leap year.",i); } else pf("\n%d is not leap year.",i); } }

Enter first number: 2000 Enter the second number: 2007 2000 is leap year. 2001 is not leap year. 2002 is not leap year. 2003 is not leap year. 2004 is leap year. 2005 is not leap year. 2006 is not leap year. 2007 is not leap year.

- 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