C/C++

Object-Oriented Programming In C++: Constant Objects

Submitted by PhoeniciansSy on

Contents:

1. Constant Variables.

2. Constant Member Functions.

Constant Variables:

Making variables constant ensures their values are not accidentally changed. Just like the built-in data types (int, double, char, etc…), class objects can be made const by using the const keyword.

Object-Oriented Programming In C++: Destructor

Submitted by PhoeniciansSy on

Contents:

1. Destructor.

2. When Constructors and Destructors are Called.

Destructor

Is a member function in the class, which has the following characteristics: 1. It has the same name as the class preceded with a tilde '~'. For example, the destructor for class Time is declared: ~Time() 2. It doesn't return any type. 3. It is called when objects are destroyed to release all allocated resources. 4.

Writing Your First C Program

Submitted by Muzammil Muneer on

Writing Your First C Program

In this part you will learn: 1. C syntax 2. Headers 3. Declaring Variable 4. Brackets and tabs 5. Input/output In this tutorial I will teach you about how to write a C Program first time. In the first program we will learn about printing on the screen and variable. In the second program we will learn about taking input from the user and displaying It on the screen. Basic Step: Open Dev C++ then File > new > source file and start writing the code below.

Fundamentals of C Language

Submitted by Muzammil Muneer on
C language is one of the basic and the most amazing programming languages. It teaches us the fundamentals of programming. It is basically the core of all the other languages. Certain important languages are based on C such as C++. So it is pretty important and useful for programmers. It is the first step in the world of C programming. This book will help us understand the concepts of C language in detail and will also help us with the conceptual programming.

Object-Oriented Programming in C++: Constructors

Submitted by PhoeniciansSy on

Contents:

1. Constructors. 2. Default Constructors. 3. Constructors with Arguments. 4. Time Class with Constructors.

Constructors:

Constructor is a member function in the class, which has the following characteristics: 1. It has the same name as the class. 2. It doesn't return any type. 3. It is called every time an instance of a class is created. 3.

Object-Oriented Programming In C++: Overloading and Default Arguments

Submitted by PhoeniciansSy on

Content:

1. Function overloading in C++. 2. Default arguments in c++.

Function Overloading in C++:

We can have multiple definitions for the same function name in the same scope. The definition of the function must differ from each other by the types and/or the number of arguments in the argument list. We can not overload function declarations that differ only by return type. Example: We can define a function called display to print a integer number.