Skip to main content

Getting Started with C

 Basic Syntax of C: Basically the C program is starting from “main()” and the whole programming is done inside the two curly braces after main. You can write this as

void main () {  }


void main(){


void main()

Before main()  we  always  write  some  return  type void  ,  int,  float,  double,  char  as  shows  in above example void is used. We will discuss later on about return type because it can be better understand after chapter Function..

Basic program in C: Try to run the below program. Here in this program we are printing Hello World! By  using printf(“”);  function anything  written  in  between  double  quotes“  ” is  printed  on output screen.

#include <stdio.h>
void main()  {
printf(“Hello World!”); }


Popular posts from this blog

Comments in C

  Comment is the code which is not executable means compiler will not compile the comments and that’s why comments are not visible on output screen. Two types of Commenting: Type 1:  double slash ‘ // ’ method the whole statement after double slash is not executed by compiler Example: try to run below code its output will be blank screen #include <stdio.h> void main(){ // printf (“Hello World!”); } #include<stdio.h> void main ( ){ //Comments // Comment printf (“Hello World!”);//abc } #include<stdio.h> //Comments void main(){ //Comments printf(“Hello World”); } o/p:  blank screen O/p:  Hello World! O/p:  Hello World In this way you can give multiple comments anywhere in the program but double slash is used to  comment only single line for commenting multiple lines use type 2.  Type 2:  For multiline commenting or for commenting a whole paragraph from the program we have  to add /* at the start of comment and */ at the end of comment as shown in examples: #include <s

New trends and advantages of C language.

1. You can program the ROBOTS and  Automatic Running Machines  using C language. click here for more information.  2. For building more advanced  software or  Games you need to  learn more advanced languages like  Visual  Basic,  .NET, JAVA, ANDROID programming which is based on C.  3. To build a website you need only HTML and you can make your own website but for making it more advance you need to learn more web designing languages like CSS, JavaScript, Ajax, PHP and this all languages are very easy to learn if you have some basic knowledge about C. 4. After learning C you will be able to make your own software like Calculator, Games, Embedded Softwares, Compilers.