C program to Check VOWEL or CONSONANT

C Programming Tutorial

C program to Check VOWEL or CONSONANT This program is written in c language. This is a example of switch case. This will read a character from user as input and check whether it is VOWEL or CONSONANT. #include <stdio.h> int main() { char ch; printf(“Enter a character: “); scanf(“%c”,&ch); //condition to check character is … Read more

program in C to get the largest element of an array

C Programming Tutorial

program in C to get the largest element of an array Problem Statement: Write a program in C to get the largest element of an array using the function.   Test Cases: Input the number of elements to be stored in the array :10 Input 10 elements in the array : element – 0 : … Read more

C program to find armstrong number

C Programming Tutorial

What is Armstrong number? Sum of a number’s digits raised to the power total number of digits is armstrong number. Armstrong numbers example: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 153, 370, 371, 407, 1634 etc Explanation: 3 = 3^1 = 3 153 = 1^3 + 5^3 + 3^3 = 153 Non-Armstrong … Read more

Simple Calculator program in C

C Programming Tutorial

This is a simple calculator program written in C Language. It Performs addition, subtraction, multiplication or division depending the input from user. This usage switch case statement. Let see the C Program # include <stdio.h> int main() { char operator; double firstNumber,secondNumber; printf(“Enter an operator (+, -, *,): “); scanf(“%c”, &operator); printf(“Enter two operands: “); … Read more

tic-tac-toe game in c

C Programming Tutorial

This is a tic-tac-toe game in C Language.  You can this as a mini project in C Language.     #include<stdio.h> #include<conio.h> #include<stdlib.h> #include <windows.h> int board[10] = {2,2,2,2,2,2,2,2,2,2}; int turn = 1,flag = 0; int player,comp; void menu(); void go(int n); void start_game(); void check_draw(); void draw_board(); void player_first(); void put_X_O(char ch,int pos); COORD … Read more

Analog Clock Program in C

C Programming Tutorial

Here is simple C program for analog clock.  This can be used as a reference for project reference. /*Note press ctrl+pause break to stop the clock while executing in TC*/ #include<stdio.h> #include<graphics.h> #include<stdlib.h> #include<math.h> #include<dos.h> #include<time.h> #define PI 3.147 void clockLayout(); void secHand(); void hrHand(); void minHand(); int maxx,maxy; void main() { int gdriver=DETECT,gmode,error; initgraph(&gdriver,&gmode,“c:\turboc3\bgi\”); … 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

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