Pointers in C++

In  a  C++ programming language, variable is used to hole the value & this variable stored in a memory.  Each variable has a address to identify where these variables actually stored in a memory.    In a C++  programming language, pointer is a variable which can hold the address of another variable.    Accessing Address of … Read more

Categories C++

Structures in C++

There are various types of data type such as int, char float etc. For example: int  i;      here variable i can store only data of integer typechar c;   here variable c can store only data of character typefloat  f; here variable f can store only data of floting-point type Variable of each data … Read more

Categories C++

Looping Statements in C++

In a programming often a situation may comes where we want to  execute the set of code again and again. Loop has a ability to repeat set of statement until a condition to be satisfied or a particular number of times. There are following types of  loop in C++  language: In a C++ programming language … Read more

Categories C++

Switch statements in C++

“switch” is a case control structure.  It contains case and default values. “switch” statement takes a value as a expression for equality testing against a list of values/case. syntax for a switch statement:-

Rules of switch statement − In a “switch” statement we can have any number of case. for equality testing against a list of values/case, constant-expression for a case … Read more

Categories C++

Decision Making Statement in C++

In the C++ language decision making statement executes if the given condition is  true otherwise conditional block will never execute. C++ language assumes non-zero and non-null values as true, and zero or null is assumed as false value. There are following types of decision making statements in C++ programming language. if statement Syntax of an ‘if’ statement − if(Condition) { /* statement will execute … Read more

Categories C++

Operators in C++

An operator is a symbol. It is used to tells the compiler to perform specific mathematical or logical functions. C++ language have a following types of built-in operators:− Arithmetic Operators Relational Operators Logical Operators Bitwise Operators Assignment Operators   Arithmetic Operators C++ language have a following arithmetic operators. Assume variable i holds 100 and variable j holds 200 then … Read more

Categories C++

Basics of C++

Tokens in C++ In a C++ language, token is either a keyword, a symbol ,an identifier, a constant or a string literal. A C++ program consists of various tokens for example, the following C++ program consists of four tokens

The individual tokens are −

Comments Comments are the text in C++  program language … Read more

Categories C++

Variables in C++

Variables is a name given to memory location.              int x =10;                     here, x is a integer variable.                                                     Integer variable x is a name given to memory location and where we stored integer value10. Initialize variable we can also initialize variables as below. int  a,b,c; a=10;b=20;c=30; Here, we have initialized three integer variable a,b & … Read more

Categories C++

Data Type in C++

There are four types of data type in C language.  They are as follows: Types Data Types Basic data types int, char, float, double, boolean User Defined data type structure, union, enum Derived data type Pointer, array, function Basic Data Types In C Language Integer Data Type Integer data ( example 1,2,3,4,5,6, ….. etc. ) … Read more

Categories C++

Simple Program in C++

A simple C++ program basically consists of the following parts − Preprocessor Commands Functions Variables Statements & Expressions Comments Basic structure of C++ program

Above shown the basic structure of C++ program. For every program we have to writeabove mention basic structure. How to write or print We can write or print in C++ … Read more

Categories C++