Monday, 29 October 2012

Tutorial 1:Getting started with C++.

Tutorial 1:Getting started with C++.

Hi! Friends,
Today  I have started a new program to post c++ tutorial. we will start from the root of c++.

Step -1 For starting writing our programs we need a text editor with compiler
I prefer to use turbo C++.

You can download Turbo C++ from Net.

We will Learn --
  • How to make basic program
  • How to compile a program
  • Checking error in the program
  • Increasing readability of a program
  • Types of errors 
  • What are header files
  • What are keywords
  • What are identifiers
  • What are tokens
  • For what  # is used
  • What are variables
  • What are datatypes
  • Types of datatypes
  • Fundamental and derived datatypes
  • Array in C++
  • Classes in C++
  • Loops in C++
  • Comments in C++
  • Multiple and single line comments
  • Use of clrscr( ) function
  • What are functions
  • What are escape sequences
  • Use of semicolon

And many more!!

Some Basic Definitions

·       Keywords- words which have predefined meaning is called a keyword.
·       Variables: - variables are the name storage location whose value can be changed during execution.
·       Token: -Token are the smallest individual units.

Making a very simple program in C++.

# include<iostream.h>     //header file
#include<conio.h>             //another header file   
{ clrscr( );                  //use to clear the screen
  cout<<”ashutosh”;  /*cout stands for standard output device(monitor)*/
  cout<<”/n your name here”;


Output of this program-
your name here

What we get from the above program.

·       In the program we have used # as a preprocessor
·       Iostream.h is the header file which we have used for input/output streams
·       Conio.h is another header file which we have to use for using the function clrscr( )
·       //(double slash are used for single line comments.
·       /* is used for multiple line comments.
·       Comments are not executed by the compiler.
·       /n is the escape sequence which is used for next line.
·       ;(semicolon) is used as a statement terminator.


Post a Comment


Get Latest Updates: Subscribe Now | Like Us on Facebook