NEW TO Programming …. Learn Some Basic of c and c++

Firstly I will Start With The Basic
Its Just Like Taking a Chocolate out of a wrapper…lol
You Will Need A Compiler For It…….I am using TURBO C
First Day I Was Taught This
Code:
#include<stdio.h>
#include<conio.h>
void main ()
{
clrscr();
printf("WELCOME TO C");
getch();
}
LETS Understand this simple code..
Code:
#include<stdio.h>
#include<conio.h>
These are the header files that contains some functions that we used in our program.
If you don’t include them you will get an error saying “Prototype Missing”
Code:
clrscr();
This Will clear the screen every Time we compile or run the program or else…..if u did’nt use this command You will see the previous compiled and recently compiled program together…..
Code:
printf("WELCOME TO C");
Printf is a command which display anything you will write inside inverted commas (“”)
Code:
getch();
This command is use to complete the program……….if u want put this your program cant be compiled…..
SO I HOPE YOU UNDERSTAND EVERYTHING……..If You Hav any queries Or Anything Just Ask me…..:D
THANKS

0 comments: