Introduction to C++ Language

 





Introduction to C++ Language

C++ is a powerful, high-performance programming language widely used in software development. It is an extension of the C programming language, incorporating object-oriented features, which make it versatile and suitable for a wide range of applications. Developed by Bjarne Stroustrup in the early 1980s, C++ has since become a cornerstone of modern programming, influencing many other languages and remaining a popular choice for developers worldwide.

Key Features of C++

  1. Object-Oriented Programming (OOP):

    • Classes and Objects: C++ supports the creation of classes and objects, allowing for modular, reusable code.
    • Inheritance: Facilitates the creation of new classes based on existing ones, promoting code reuse and extensibility.
    • Polymorphism: Allows functions and operators to behave differently based on the objects they are acting upon.
    • Encapsulation: Ensures that an object's internal state is protected from unintended interference and misuse.

v     Objective:-

·       The basic programming and OOPs concepts

·       Creating C++ programs

·       Tokens,expression and control structures in C++

·       Arranging same data systematically with arrays

·       Classes and object in C++

·       Constructors and destructors in C++

·       Files managament and templates in C++

·       Handing exceptions to control errors

 

v     Data types:-

·       Integer

·       Float

·       Character

·       Double

·       Long double

·       String

·       Signed integer

·       Unsigned integer

v    Variables:-

·       Variable is a named memory location .It is used for store program input data and output data during execution. The value of the variable may be change during execution of program. The name of the variable can’t be change.

·       During writing the name of variable the space cannot be allow.

·       The name of variable like as follow:

a , b, mark, hussnain, etc.

v operators:-

·       Addition(+)

·       Subtraction(-)

·       Division(/)

·       Multiplication(*)

·       Modules(%)

v Operators precedence:-

C operation

Operation(s)

Order of evaluation (precedence)

         ()

Parentheses

Evaluation first.

Unary(+.-)

Addition

Subtraction.

unary plus and minus from right to left

 

*, /, or %

 

Multiplication

Division

Modulus

 

Evaluated second. If there are several, they are

evaluated left to right.

 

Binary : +or -

 

 

Addition

Subtraction

 

Evaluated last. If there are several, they are

evaluated left to right.

 

Ø Statement#1

#include <iostream>

using namespace std;

int main()

{

cout<< "My first C++ program." <<endl;

cout<< "The sum of 2 and 3 = " << 5 <<endl;

cout<< "7 + 8 = " << 7 + 8 <<endl;

return 0;

}



Share this:

ABOUT THE AUTHOR

Hello We are OddThemes, Our name came from the fact that we are UNIQUE. We specialize in designing premium looking fully customizable highly responsive blogger templates. We at OddThemes do carry a philosophy that: Nothing Is Impossible

0 comments:

Post a Comment