coderz.py

Keep Coding Keep Cheering!

Program to Find ASCII Value of a Character

In C++ programming, a character variable stores an ASCII value (an integer number between 0 and 127) rather than the character itself. This is known as the ASCII value. For instance, the ASCII value of ‘A’ is 65. Therefore, to find the ASCII value of the given Character, we make use of the concept of Type-Casting. […]

November 5, 2022 | C++ | No comments

Even Or Odd number check

A number is even if it is divisible by two, and odd if it is not divisible by two. Some of the even numbers are − Some of the odd numbers are − program code: Output: In the code, we use the if-else block to determine whether the entered number is even or odd. Note: also […]

November 5, 2022 | C++ | No comments

Adding two numbers

Program code: Output: where, int sum=0: A variable can be initialized during the declaration process. This is usually done to ensure that the value to be used in the future is not set to some random value at the start. sum = x + y: The addition operation is performed by this statement. Note: also […]

November 5, 2022 | C++ | No comments

Hello World program

Program code: Output: #include<iostream>: A number sign (#) at the start of a line instructs the compiler’s pre-processor. The <iostream> header defines the libraries required to accept and output data.  using namespace std: This instructs the compiler to use the standard (std) namespace, which includes C++ Standard Library features. int main(): C++, like any other […]

November 5, 2022 | C++ | No comments

Namespaces in C++

What are Namespaces in C++? Namespaces are logically separated sections of a program. They are required if you want multiple functions with the same name. These functions can be declared in two different namespaces and called by referencing the corresponding namespace. It is similar to referring to the second names of two people who share […]

November 4, 2022 | C++ | No comments

Multithreading in C++

What is Multithreading? Multithreading is a subset of multitasking, which is the feature that allows your computer to run two or more programs at the same time. Multitasking is classified into two types: process-based and thread-based. What is a Thread? A multithreaded program has two or more parts that can run simultaneously. Each component of […]

November 3, 2022 | C++ | No comments

Memory Management in C++

What is Memory Management? Memory management is defined as the process of managing a computer’s memory, such as assigning memory to programs, variables, and so on, in such a way that it does not affect overall performance. Need for Memory Management: Memory management is required to ensure that no memory is wasted and that allocation […]

November 2, 2022 | C++ | No comments

File Handling using File Streams in C++

A file is a medium for storing data or information. The sequence of bytes provided as input to the executing program and the sequence of bytes returned by the executing program is referred to as streams. File handling is the process of storing data permanently in a computer. We can store data in secondary memory […]

November 1, 2022 | C++ | No comments

Exception Handling in C++

What is an Exception? An exception is a problem that arises during the execution of a program. A C++ exception is a response to an exceptional circumstance that arises while a program is running What is Exception Handling? In C++, exception handling is the process of dealing with runtime errors. We handle exceptions so that […]

October 31, 2022 | C++ | No comments

Examples of Operator Overloading in C++

Let’s see examples of operator overloading in C++ for various types of operators. Examples: 1) Add given timestamps by overloading + operator setTime() function is used to set HR, MIN and SEC values. showTime() function displays the time in a specific format (HH:MM:SS). We add the seconds, minutes, and hours separately to get the new time […]

October 30, 2022 | C++ | No comments

Advertisement