Saturday, 6 December 2014

Let's Start with C Programming - 1st program

Let us start with C-ANSI programming. 
I will post all the material of C programming as much as I learnt.

Actually C was 1st programming language that I learn , to Complete Course Requirements of My 1st Semester of Electrical Engineering. I really Enjoyed this Course, after 6 months of starting it , i can make conversation in 5 Different programming languages.

let's start with 1st program, that is Assalam u Alikum World program

C code 
 //-----------------------------------------------------------------------------

#include<stdio.h>
int main()
{
printf("Assalam u Alikum World \n"); 
return 0;
}
//------------------------------------------------------------------------------
the above code segment is 1st program of C language which is usually taught.

#include<stdio.h>
this line indicates compiler to include library named in "<>"
Stdio.h is standard Input Output Library in C.

Int main()
 it indicates initialization of main function of integer type.
At this stage i will only say that C language program  includes many function, and "main" function is most important , in which we write the basic code.

{}
these brackets indicate boundary of a block/function.

printf("Assalam u Alikum World \n");
printf() is function for displaying something as output on screen.

return 0 ;
indicates successful termination.



For C language I will Recommend Following Books
The C programming Language By Brian W. Kernighan and Dennis M. Ritchie.
 C How to Program by Dietel and Dietel

No comments:

Post a Comment