Wednesday, July 10, 2019

Basic concepts, reference and check list of c plus plus programming.

In this post, you will learn about the basic concepts, and reference term used in c plus-plus programming. also, you can see the list of basic concepts which is used in c plus-plus programming.

Introduction to c plus-plus programming. 

c plus-plus programming language is derived from the c programming language. it's also a general-purpose programming language. it was developed by the Bjarne Stroustrup at bell lab. it's based on object-oriented programming concepts. it's used both high and low-level programming language. it's used to create computer programs and especially for art applications like a music player or video games. 

Basic concepts, reference and check list of c plus plus programming., introduction to c plus plus programming.
c plus-plus programming

List of basic concepts used in c plus-plus programming. 

#include :
This tag is used to include one source file into another source file. 

<iostream> :

This tag defines the standard stream objects which are used to give input and get output in the program.

<fstream> :
This tag defines the file stream object which is used by input/output stream class. 

std :
This tag is used to declare features of c plus-plus programming's standard library.

cout :

This tag is used to write output to the user's screen.

cin :

This tag is used to read the input from the standard input device.

endl :

This tag is used to write the output to the new line. 

break :

This keyword is used to exit from the loop or from the condition. 

continue :

This keyword is used to terminates the current line of code. 

const :

This keyword is used to makes an object, function and variable constant.

int :

This tag is used to define the integer type variable which can hold the whole number value. 

float : 

This tag is used to define the floating type variable which can hold the floating or decimal values.

char :

This tag is used to define the character type variable which can hold the character type values. 
bool :
This tag is used to define the boolean variable which can hold only the true(1) or false(0) value. 

string :

This tag is used to define the string type variable which can hold the sequence of character type values.

signed :

A signed variable can hold both negative and positive values. by default, a variable is always signed variable. 

unsigned :

An unsigned variable can hold only positive values. 

array :

This is a user-defined data type which can hold the number of values of the same data type. 

pointer :

a pointer can store the address of an object or address of a variable. 


It's a type of constant which can hold the value of zero.

sizeof() :
This function returns the size of an object in bytes.

void :
This tag indicates that a function or method does not return a value. 

Encapsulation :

This is a method in which we pack the data and functions into a single component. 

Inheritance :

A process in which one class inherits the members and methods of another class.

virtual function :

A function or method whose behavior can be overridden within an inheriting class by a function with the same sign. 

polymorphism :

In polymorphism when we call to a member function will cause a different function to be executed depending on the type of object that invokes the function. 

abstract class :

A class which has a pure virtual function. it can only be a base class for other classes. 

Comments :

comments are explanatory information which is included in the program to benefit the reader of your code. the compiler totally ignores the comments so there are no effects of comments in the program's execution. 

Arithmetic operators :

operators are used to performing arithmetic operations like additions(+), subtractions(-), division(/), multiplication(*) and other such other operations.

Assignment operations :

An assignment operation is used to assign the values to the variables and compare the two values of variables.

Relational operators :

The relational operators are used to perform a boolean expression which returns true or false.

logical operators :

logical operators are used to forming a compound boolean expression that tests multiple conditions.

Type conversion :

when a numeric expression contains operands of different data types, then they are automatically converted into another type as necessary. this type of process called type conversion.

variable :
a variable is a name for an area in memory. it's also called the identifier.

scope of variable :

scope of a variable refers to the visibility of variables within a program. variables declared in a function are local to that block of code and variables declared outside all functions are global to the entire program.

static variable :

a static variable is variable which retains it's value for the life of the program and can be accessed every time the function is re-entered.

if()else :

The if-else statement is used to perform different computations or actions depending on whether a condition evaluates to true or false.

conditional expressions :

the conditional expression is used to define a condition in a line of code and evaluate the code on the base of the condition's true or false.

switch statement :

switch statement breaks the code into the constant case value and performs the actions on the base of the condition's true or false. 

while loop :

while statement is used to executes a line of code repeatedly while an expression is true, looping over and over again.

do-while loop :

The do-while loop executes the loop statements before evaluating the expression to determine if the loop should be repeated.

for loop :

The for loop is used to executes the statements a fixed number of times.

main() :

This is the main function which is the center of the code. a compiler always starts the executing the code from the main function's open curly braces ( { ) to the close curly braces ( } ). a program in a c plus-plus has always the main function.

functions :

the function is a block of code which is used to perform a specific task in a program. a function executes it's code when it called.

Memory :

When we declare the variables in the program then c plus-plus automatically allocate space for the variable in an area of memory called the stack. there is the different-different size of memory allocation on different-different variables.

Files :
in c plus-plus programming, an external file can be opened, read, and written to the c plus-plus program. for these operations, c plus-plus includes the FILE type for defining a file stream.

Error or exception handling :

An error or exception is any situation that causes your program to stop normal execution. so to work on the errors in the program we use exception or error handling. exception handling is an approach to processing run time errors. 

Exit() :

The exit command immediately stops the execution of a program and sends an exit code back to the calling process. 

Best books for learning c plus-plus programming.

Previous Post
Next Post

Yash is a Full Stack web developer. he always will to help others. and this approach takes him to write this page.