Introduction to C++ & First Simple Program | Topic 1 | VU Insider

Introduction to C++:

C++ is a platform used to create high level softwares or applications. It's the modified version of C and was developed by Bjarne Stroustrup. C++ provides high level control over system resources. It is one of the world's most popular programming languages. It is an object oriented programming language which allows code to be reused. C++ is portable to multiple platforms.

#include <iostream>
using namespace std;
cout<<"Hello, welcome to VU Insider.";

Now let's explain the code.

#include <iostream> using namespace std;code-box Not part of our program but are important instructions to compiler (compiler is a translator to translate code of our program into machine language)

main()code-box main is actually the one which will be run when we run a program. Here "()" are necessary to include.

{}code-box Braces "{}" are used to arrange program instructions in multiple groups.

coutcode-box Known as output stream in C and C++.

"<<"code-box It shows direction of data. And cout means to display data on screen.

"Hello, welcome to VU Insider." code-box The string inside of double quotes is known as character string.

;code-box Semi-colon is very important in every statements in C. If you missed it, compiler will show you syntax error.

system("pause"); code-box A statement to pause the program after execution. If it's not included in your program then your program will be quickly disappear after execution.

Post a Comment

Previous Post Next Post