Moving car program in C++

C Programming Tutorial

Moving Car Program in C++ This program is written in C++ using graphics to create and move a car. A car is made using two rectangles and two circles which act as tyres of car. A for loop is used to move the car forward by changing the rectangle and circle coordinates and erasing the … 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