Basic Of C++
Programming At TCCI, Ahmedabad
Welcome to TCCI-Tririd Computer Coaching Institute.
This tutorial is designed to introduce
basics of C++ to any new learner.
C++
is a middle-level programming language developed by Bjarne Stroustrup starting
in 1979 at Bell Labs. C++ runs on a variety of platforms, such as Windows, Mac
OS, and the various versions of UNIX.
We can categorizes programming
languages in two, one is higher level and lower level. Computer can understand
only lower level machine language, which is difficult for user to write
programme in that language. In which we write our programs, is higher level
(generally English), Computer can’t understand that language. So, first of all
that language should be converted into lower level language (machine language).
Which our computer can understand.
So, we write programmes, in which
language is called, source code also. It has been converted to machine code by
compiler. This process is called compilation. During compilation source code
has been checked for any syntax error or logical error. If there is no error,
then programme run successfully. After then processor do calculation or
whatever our specific task, which we want as desired result.
There is always pre-processor directory
as a first statement in c++ programme. One is “iostream.h”. It stands for input output stream. Which
includes standard Input and Output functions in c++ library. When programme compiles,
these functions are fetched in programme from c++ library. Second is “conio.h”,
It stands for Console Input Output. This directory includes “clrscr()” and
“getch()” function. Every C++ program must have one special function main ().
Main has no return data type. So, always use void as data type. If you want ,
you can use int main() also. But then in programme you have to include “return
0;” as last statement.This is starting point of c++
programme. Always main function has pair of braces {}. First {-opening brace
call compiler starting of programme execution. Second}-closing brace call
compiler ending of programme execution. Whatever our task/operation/function is
written between these opening {and} closing braces. Then each expression
statement inside function must end with a semicolon. Here, one statement
is written as a source code, printf statement. Its function is to display to
the computer screen as an output to user.
Here is simple example of C program.
#include<iostream.h>
#include<conio.h>
Void main ()
{
cout(“Wel
come to TCCI-Tririd computer coaching Institute.”);
}
Output:
Wel come to TCCI-Tririd computer coaching Institute.
This programme just display what we
have written in printf statement.
To learn more contact C language at
TCCI.
For More Information About Basic of C++ programming at
TCCI, Ahmedabad,
computer
course, programming
course
No comments:
Post a Comment