coderz.py

Keep Coding Keep Cheering!

Program to Reverse an Array

When an array is reversed, the elements of the original array are changed in order. With this method, the first element becomes the last and the last element becomes the last one in the array. However, the procedure keeps going until all characters or array elements are completely inverted. Program Code: Output: Note: also read about Program […]

December 12, 2022 | C++ | No comments

Check for Prime number

A prime number is greater than one and can be divided by one or itself. In other words, prime numbers cannot be divided by anything other than themselves or 1. Prime numbers include 2, 3, 5, 7, 11, 13, 17, 19, 23, etc. Program code: Output: Note: also read about Diamond Pattern Using Numbers Follow Me […]

November 11, 2022 | C++ | No comments

Classes and Objects in C++

The fundamental idea that the object-oriented approach revolves around in C++ is the concept of classes and objects. It increases the efficiency of the program by reducing code redundancy and debugging time. Classes: A class is the building block in C++ that leads to Object-Oriented programming. It is a user-defined data type with its own […]

October 4, 2022 | C++ | No comments

Decision-Making in C++

In real life, we face situations where we must make decisions and decide what to do next. Similarly, the programmer must specify one or more conditions to be evaluated or tested by the program, as well as a statement or statements to be executed if the condition is determined to be true, and optionally, additional […]

September 27, 2022 | C++ | No comments

C++ sizeof() and typedef Operator

sizeof(): The sizeof keyword is a compile-time unary operator that determines the size of a variable or data type in bytes. sizeof() operator is used in different way according to the operand type, i.e, When operand is a Data Type. When operand is an expression.  Syntax: Example: Output: Typedef: The typedef keyword allows programmers to create new […]

September 25, 2022 | C++ | No comments

Variables in C++

A variable is a name that is assigned to a memory location. It is the fundamental storage unit in a program. In C++, each variable has a type that determines the size and layout of the variable’s memory, the range of values that can be stored within that memory, and the set of operations that […]

September 23, 2022 | C++ | No comments

Data type and Modifiers in C++

A data type specifies the type of data a variable can store, for example, integer, floating point, character, etc. C++ supports the following data types: Primary or Built-in or Fundamental data type Derived data types User-defined data types Primary or Built-in or Fundamental data type: These data types are built-in or predefined data types that […]

September 23, 2022 | C++ | No comments

Advertisement