c++ introduction
C++ was developed by Bjarne Stroustrup, as an extension to the C language.
C++ was developed as an extension of C
C++ is a middle-level, general-purpose programming language designed for system and application programming.
It was developed by Bjarne Stroustrup at Bell Labs in 1983 as an extension of the C programming language.
C++ is object-oriented as well as supports procedural-oriented programming styles.
One of the key features of C++ is its ability to support low-level, system-level programming, making it suitable for developing operating systems, device drivers, and other system software.
At the same time, C++ also provides a rich set of libraries and features for high-level application programming, making it a popular choice for developing desktop applications, video games, and other complex applications.
basic syntax of C++ program
primitve data types in c++
Data Types Memory Size Range
int 4 -2,147,483,648 to 2,147,483,647
float 4 -3.4×10^38 to 3.4×10^38
char 1 -128 to 127
there are also other data types also:
boolean: boolean data type has two values true or false
if you get 0, so it is false
if you get 1, so it is true
void :valueless
variables
variables are like containers that are used to store data on a temporary basis.
syntax:
data_type var_name=value;
example:
int age=16;
float height=4.5;
char gender='m';
0 Comments