C++ tutorial for Beginners | CPP Basics | Variables and Data Types

132 Просмотры
Издатель
Hello viewers,
thank you for watching this tutorial.

It's just a recording of one of our online live class of Object Oriented Programming using C++.

This tutorial covers some of the basic C++ programming syntax, a little bit of introduction of variables and data types.

like
cout is used for displaying message or statements.
cin is used for taking input from the user.

The code statement "using namespace std" means std is a namespace that is being used.

If we are talking about namespace then it is used to provide scope to functions and variables or we can say that namespace is used to organise the code statements into logical groups or modules.

when we create a project in code blocks then CBP file is generated which is codeblocks project file with extension cbp and the file type is CD Box Labeler Pro.

Insertion operator is used with cout whereas extraction operator is used with cin.

if we are talking about variables then variable refers to a memory location where some data, value or information is stored.
In other words, variables are used to reserve some spaces in memory for the data, value or information.

In C++ programming there are three types of variables:
1. Local Variable
2. Instance Variable or Non-Static Variable
3. Static Variable or Class Variable
which will be discussed in the next lecture recording.

In programming languages, data types are used to defined the type of data which is being processed and based on the type of data the memory is allocated.

In C++ programming, there are three types of data.
1. first is the primitive data types or built-in data types(integer, character, boolean, floating-point, double floating-point and wide character),
2. second is derived data types (array, function, pointer, and reference),
3. and third is the abstract or user-defined data types (class, structure, union, enumeration and typedef).

We also have data type modifiers in c++ which are used with the built-in data types to modify the length of data.
The modifiers are signed, unsigned, long and short.

We hope that you have understood the concepts and if you have any query or suggestions then write them in the comment section.

Thank you.
Категория
Язык программирования C++
Комментариев нет.