Skip to main content

Featured

Tic Tac Toe

Tic Tac Toe Tic Tac Toe is a simple, two-player strategy game played on a 3x3 grid. Players take turns marking a square with either an "X" or an "O", with the goal of being the first to align three of their marks in a row, column, or diagonal.  I have made a simple Tic Tac Toe game using html, css, javascript.  The game doesnot have much features. The game is created to be played by two peoples. It is just a simple game. The code of this game you get in my github page   Link of this game code is below: Tic Tac Toe Game Code /

Basic Syntax of C program

 #include <stdio.h>

int main(){

printf("Hello world");

return 0;

}


The above program is one of simplest program that is written in C language. Let's understand the each line.

 #include <stdio.h>

This statements which begins with # sign are directives for the preprocessor. These statements are processed before the program is compiled. Preprocessor handles these directives. Preprocessor  directive shown above attaches the code of the header file stdio to your program. Header files are those files which contain all the information that is required to make use of the  C libraries.

int main()

From her the main function starts. The main() function is the point from where all C programs begins their execution. The content of main() function is alway executed first. The content are written inside the '{'  and '}'.

printf("Hello world");

This lines displays the message. printf() statement is used to display message. Every executable statement in C must be terminated by semicolon ;

return 0;

It means that the function doesnot return any value.




Comments

Popular Posts