Home > C++ (Page 2)

Conditional Statements in C++

A conditional statement or Conditional statements in C++ are used to make a decision based on specific condition and run the desired set of statements.Conditional Statements in C++ There are different types of conditional statements available in c++. They include: If statements, Switch cases, C++ ternary operator or sometimes we refer it

Read More

Operators in C++

We have different types of operators in c++. These operators helps programmers in performing different task. As each of these are used for special purpose. These include Arithmetic operators, Unary (Single operand) & Binary (2 operands) operators, Relational operators, Logical operators, Assignment operators. Types of operators in c++ Arithmetic Binary (2 operands): - As

Read More

Variables in C++

In C++ Variables can be considered as memory location. They provide us a named storage that our program can manipulate. Basic syntaxDeclaration Datatype variable_name; Datatype: could be any one of the predefined or user defined data types discussed above. variable_name: is the any valid name of the variable we created by following

Read More

Comments in C++

Comments in a program are explanatory statements that helps reader to understand source code. They must be written in a way that help reader to understand code. E.g. //setting value of x to 10. int x=10; now the above comment is not helping reader to understand code as reader can understand that x is

Read More