Object Oriented Programming: Chapter 1: Principles of Object Oriented Programming

C++ Constructs and Syntax

Comments are those statements in the program which are non executable in nature. They provide simply the information about the programming statements.

C++ Constructs and Syntax


1. Comments

• Comments are those statements in the program which are non executable in nature. They provide simply the information about the programming statements.

• There are two ways by which we can give the comments in C++.

The First way is similar to the comments in C. The start of the comment is /* and end of the comment is */. This comment statement is a multiline comment statement that means you can comment many lines together using /* and */.

Another way is // at the start of the line which is to be commented. This is a single line comment statement. The comment statements are useful in documenting the program.

 

2. Difference between C and C++

• The language C++ (pronounced as see plus plus) was developed by Bjarne Strousstrup in 1979 at Bell Labs.

Difference between C and C++


C Language:

1. C is a procedure oriented language.

2. C makes use of top down approach of problem solving.

3. The input and output is done using scanf and printf statements.

4. The I/O operations are supported by stdio.h header file.

5. C does not support inheritance, polymorphism, class and object concepts.

6. The data type specifier or format specifier (%d, %f, %c) is required in printf and scanf functions.

C++ Language:

1. C++ is an object oriented programming language.

2. C++ makes use of bottom up approach of problem solving.

3. The input and output is done using cin and cout statements.

4. The I/O operations are supported by iostream.h header file.

5. C++ supports inheritance, polymorphism, class and object concepts.

6. The format specifier is not required in cin and cout functions.

 

Object Oriented Programming: Chapter 1: Principles of Object Oriented Programming : Tag: Oops, Computer Programming : - C++ Constructs and Syntax


Object Oriented Programming: Chapter 1: Principles of Object Oriented Programming



Under Subject


Object Oriented Programming (OOPs)

CS25C07 2nd Semester CSE, CSE(CY) Depts | 2025 Regulation | 2nd Semester 2025 Regulation



Related Subjects


English Essentials II

EN25C02 2nd Semester | 2025 Regulation | 2nd Semester 2025 Regulation



Linear Algebra

MA25C02 2nd Semester | 2025 Regulation


Applied Physics (CSIE) II

PH25C03 2nd Semester AIDS, CSE, IT, CSE(CY) Dept | 2025 Regulation | 2nd Semester 2025 Regulation


Digital Principles and Computer Organization

CS25C06 2nd Semester AIDS, CSE, IT, CSE(CY) Dept | 2025 Regulation | 2nd Semester 2025 Regulation


Basic Electrical and Electronics Engineering

EE25C01 2nd Semester | 2025 Regulation | 2nd Semester 2025 Regulation


Object Oriented Programming (OOPs)

CS25C07 2nd Semester CSE, CSE(CY) Depts | 2025 Regulation | 2nd Semester 2025 Regulation


Re-Engineering for Innovation

ME25C05 2nd Semester | 2025 Regulation | 2nd Semester 2025 Regulation


Object Oriented Programming (OOPs) - Laboratory

CS25C07 2nd Semester CSE, CSE(CY) Depts | 2025 Regulation | 2nd Semester 2025 Regulation