C++ Tutorial

Learn C++ Tutorial This C++ tutorial helps beginners and professionals to learn C++ easily. Index Title Tutorial C++ History Tutorial C++ Installation Tutorial C++ First Program Tutorial C++ cin and cout Tutorial C++ Data type Tutorial C++ Variable Tutorial C++ operator Tutorial C++ Keywords Tutorial C++ OOPs Concepts Tutorial C++ If Tutorial C++ Nested if Tutorial C++ …

Read moreC++ Tutorial

C++ History

C++ is a middle-level programming language developed in 1980s by Bjarne Stroustrup at Bel Labs. C ++ development initially started in 1979, four years before its launch. It is started with name C with Classes not C++. In the end part of 1983, C with Classes was first used for AT&T’s internal programming needs. In the same year its …

Read moreC++ History

C++ Installation

Let’s install C++ setup to start programming in C++. C++ setup contains C++ compiler which is required in your system. There are lots of C++ compilers available, you must choose according to your compatibility. List of C++ Compiler For Windows: Turbo C++ Microsoft Visual C++ Code::Blocks Borland C++ GCC For Linux: g++ For Mac OS: …

Read moreC++ Installation

C++ First Program

Let’s write a simple basic program structure of C++, its compilation and its execution (how it runs). This program is compiled using GCC compiler. Open any editor to write C++ program.

Output of above program

Compile and Run After writing C++ program, save the program with any name (first) with .cpp extension (first.cpp). Open any command prompt (MinGW …

Read moreC++ First Program

C++ cin and cout

C++ Standard Input/Output C++ standard input/output operations are performed to flow bytes stream from keyboard (input device) to main memory and from main memory to display screen (output device) respectively. The input/output are done using standard libraries provided by C++. C++ I/O Library Header Files Library Description <iostream> This library defines cin, cout, cerr,and clog objects for input …

Read moreC++ cin and cout

C++ Data type

Data type in every language is very important. Data type means the different kind of data which are supported by a particular programming language. C++ programming language supports various kinds of data types. C++ data types are broadly classified into three categories. Built-in data types. Derived data types. User defined data types. C++ Built-in Data …

Read moreC++ Data type

C++ Variable

C++ variable are used to store data in memory location. The value stored in variable may be changed depends on program execution. Each variable in programming language has its own specific types. These specific data types determine the size and layout of the variable’s memory. Rules of C++ Variable Declaration: C++ variable name can be …

Read moreC++ Variable

C++ operator

An operator is specially a symbol that tells compiler to perform specific manipulation. C++ contains various different types of operators. Types of C++ Operators Arithmetic Operators Logical Operators Relational Operators Assignment Operators Bitwise Operators Misc. Operators Arithmetic Operators Arithmetic operators are used to perform basic mathematical operation such as addition (+), subtraction (-), multiplication (*), …

Read moreC++ operator

C++ Keywords

Keywords are explicitly reserved identifier of C++ language features. It cannot be used as user-define program elements or other name for the program variables. C++ programming language has several reserved keywords used in program. ANSI C++ also uses the keywords available in ANSI C programming language.   ANSI C programming language keywords: auto double int struct …

Read moreC++ Keywords

C++ OOPs Concepts

C++ Object-Oriented Programming Concepts C++ uses the concept of object-oriented programming. Object Oriented Programming has some prominent features: Object Class Data abstraction Encapsulation Polymorphism Inheritance Message passing   Object An object is the basic unit of object-oriented programming. It is a real-time entity. It can represent any item that the program has to handle. Declaration Syntax: …

Read moreC++ OOPs Concepts