C++ Arrays

C++ has two kinds of data types: a)intrinsic data types (or) primitive data types and b)complex data types. Intrinsic data types are basic or fundamental data types implemented directly by C++.They contain the data or values directly.For example, the char data type stores character value and the int data type stores an integer value.Complex data... Continue Reading →

Type Conversions in C++

Type casting refers to converting one data type to another. There are 2 types of type casting.They are a)implicit type casting and b)explicit type casting. a)Implicit conversion or casting is an automatic conversion.For example: int i = 1; long l; l = i; Here, C++ automatically converts the data type for us from int to... Continue Reading →

C++ Variables and Constants

C++ is a strongly typed language because every variable must be declared with a data type.This variable cannot be later assigned a value of another data type.For example,if we declare an integer called int abc then, abc can only store integers.It cannot store any float values. A C++ identifier is a name used to identify... Continue Reading →

C++ Statements and Data Types

A C++ function is nothing but a sequence of statements.A statement is like an instruction.It is terminated by a semi-colon( ; ). There are different types of C++ statements that are used in C++. They are: Declarations - Declarations are used to declare variables or constants that will be used in the C++ program. Assignments... Continue Reading →

Structure of a C++ program

Today we will learn the basic structure of a C++ program. Let us look at this small piece of code line by line. The line starting with "#" is known as a pre-processor directive. It instructs the compiler to find the file that contains code for a library known as iostream which contains code that... Continue Reading →

Object Oriented Programming(OOPs) concept of C++

C++ supports Object Oriented Programming(OOPs). Object-oriented programming (OOPs) is a programming language paradigm organized around¬†objects¬†.Object refers to both data and the functions attached to the data. The main concepts of OOPs are: Encapsulation:Encapsulation is all about binding the data variables and functions together in a single capsule called class.This capsule secures the data from external... Continue Reading →

Powered by WordPress.com.

Up ↑