Tuesday, 15 March 2016

BASIC C program


hello guys , today we are gonna start with our 1st program in C language....we are gonna learn this program in small small parts cause this is your base for the future program so everything should be crystal clear.
soo here's our first program
#include <stdio.h>
#include <conio.h>
void main()
{ clrscr();
printf("hello world");
}

note: C and C++ is the case sensitive language



output:

hello world


to view output screen in turbo IDE we need to press alt+F5
turbo c contain 2 screen blue screen which is code window and other is black screen which is known as console window or output window
in programming language #  symbol is know as "poul".Actually unlike any other language in C  and C++ our program is first processed by an special software know as pre-processor after that compiler compiles our program.

source code -> pre-processor -> compiler



 so now the question is ....what is this pre-processor ???????

so by the word pre-processor we can understand that it is something that  starts / perform's its task before any process.IN our program there are some lines with .h extension for example #include<stdio.h> , these file are known as header files . BASICALLY  C IDE  provides us some preloaded functions or programs using which we can simplify our programs for example clrscr(); is an pre-defined function which comes under conio.h header file
pre-processor replace our header line with pre-defined functions that comes under that header file.we can see that if we compile our program then compiler will show around 400-500 lines compiled but our code is only of 7 lines therefore pre-processor replace lines which start with # with the functions which comes under that header file.so compiler does not deals with header line or the lines containing #include cause pre-processor replace these file with pre-defines functions.
thats all for today , we will discuss about each header files in my next post ....
follow me on twitter @mayank8005

thank u!!!!


Related Posts:

  • escape sequences (part-2) hello guys today, i m gonna  about remaining escape sequences:: \r = carry return character  so how it works?? /r will return curs… Read More
  • IDE.....!!!! HELLO  guys , today i am gonna show you guys how to install IDE  of C langugae... SO  guys what is an IDE ? well guys ,IDE stands … Read More
  • stdio.h????? hello guys, today i am gonna tell you about most used header file which is <stdio.h>.. here is our basic program we are gonna study all of… Read More
  • BASIC C program hello guys , today we are gonna start with our 1st program in C language....we are gonna learn this program in small small parts cause this is yo… Read More
  • program to add two number hello guys today i m gonna show u a basic program to add to no.... so there are five airthematic operator in c/c++ + addition - substraction * mult… Read More

0 comments:

Post a Comment