C Program to Check Leap Year

C Programming Tutorial

   A year is a leap year if − It is evenly divisible by 100 If it is divisible by 100, then it should also be divisible by 400 Except this, all other years evenly divisible by 4 are leap years. —————————————————————— #include <stdio.h> int main() { int year; printf(“Enter a year: “); scanf(“%d”,&year); if(year%4 … Read more

C program for Snake game

C Programming Tutorial

Snake Game is mini project  in a C language. It is console application without graphic library that’s why it is more interesting. This game is perfect without any error and better user interface. It is complied in code block using c language. Here goes a source code you can copy and compiled it in code block. … Read more

C Program to find prime number

C Programming Tutorial

What is prime number? Definition of prime number A number is considered as prime number when it satisfies the below conditions.It should be whole number It should be greater than 1 It should have only 2 factors. They are, 1 and the number itself. For Example: 2, 3, 5, 7, 11, 13, 17, 19, 23, … Read more

The do-while Loop in C

the do while loop in c

There is a minor difference between the working of while and do while loops. This difference is the place where the condition is tested. The while tests the condition before executing any of the statements within the while loop. As against this, the do-while tests the condition after having executed the statements within the loop. … Read more

The continue Statement in C

C Programming Tutorial

The keyword continue allows us to take up the control to the beginning of the loop, bypassing the statements inside the loop, which have not yet been executed. When continue is encountered inside any loop, control automatically passes to the beginning of the loop. A continue is usually associated with an if. Let’s consider the following … Read more

The Odd Loop in C

the odd loop in

Uses of Odd Loop In real life programming one comes across a situation when it is not known beforehand how many times the statements in the loop are to be executed. This situation can be programmed as shown below: /* Execution of a loop an unknown number of times */ main( ) { char another … Read more

Nesting of Loops in C

nesting of loop

The way if statements can be nested, similarly whiles and for can also be nested. To understand how nested loops work, look at the program given below: /* Example of nested loops */ main( ) { int r, c, sum ; for ( r = 1 ; r <= 3 ; r++ ) /* outer loop … Read more

Download C / C ++ IDE – C program editor

turbo-c

C-Free is a professional C/C++ integrated development environment (IDE) that support multi-compilers. Use of this software, user can edit, build, run and debug programs freely. With C/C++ source parser included, although C-Free is a lightweight C/C++ development tool, it has powerful features to let you make use of it in your project. C-Free Packages package name: … Read more

The For loop in C

C Programming Tutorial

For loop is probably the most popular looping instruction. The for allows us to specify three things about a loop in a single line: Setting a loop counter to an initial value. Testing the loop counter to determine whether its value has reached the number of repetitions desired. Increasing the value of loop counter each time the … Read more

The loop Control Structure in C

turbo-c

The programs that we have learned/developed in this tutorial so far used either a sequential or a decision control instruction. In the first one, the calculations were carried out in a fixed order, while in the second, an appropriate set of instructions were executed depending upon the outcome of the condition being tested (or a logical … Read more