coderz.py

Keep Coding Keep Cheering!

Accessing data members

Members of a class can be accessed directly within the class by using their names. Accessing a member outside the class, on the other hand, is determined by its access specifier. The access specifier not only determines where the member is accessible in the program but also how it is accessible in the program. Note: […]

October 9, 2022 | C++ | No comments

Access Modifiers in C++

Access modifiers, also known as Access specifiers, are used to implement Data Hiding, an essential aspect of Object-Oriented Programming. Data hiding is an important feature of Object-Oriented Programming that allows program functions to avoid directly accessing the internal representation of a class type. The labeled public, private, and protected sections within the class body specify […]

October 9, 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

Functions in C++

What are functions? A function is a collection of statements that accept input, perform some specific computation, and return output. The idea is to combine some frequently or repeatedly performed tasks into a function so that instead of writing the same code for different inputs, we can call the function. Advantages of functions: Code Reusability […]

October 2, 2022 | C++ | No comments

Storage classes in C++

Storage classes in C++ are type specifiers that aid in defining the lifetime and visibility of variables and functions within a C++ program. C++ storage classes aid in determining the existence of a specific variable or function during the execution of a program. Syntax:  Types of storage classes: Five different kinds of storage classes can […]

October 1, 2022 | C++ | No comments

Jump Statement in C++

When encountered, jump statements are used to shift program control from one part of the program to any other part of the program unconditionally. In C++, jump statements are implemented using : continue break return goto continue: Within loops or iterative statements, continue statements are used. The continue statement’s goal is to skip the remaining statements of the current iteration of the loop and proceed to the next iteration. Example: Output: break: The break statement allows us to jump out of the loop instantly, without waiting to […]

September 29, 2022 | C++ | No comments

Loops in C++

In C++ programming language, the repetitive operation is done through loop control instruction. There are three methods by which we can repeat a part of a program.  Types of Loops: Entry Controlled Loops: The test condition is tested before entering the loop body in this type of loop. Entry-controlled loops are For Loop and While […]

September 28, 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

Operators in C++

An operator is a symbol that instructs the compiler to perform particular mathematical or logical operations. C++ has a wide range of built-in operators, including the following: Types of operators: Arithmetic Operators Relational Operators Logical Operators Bitwise Operators Assignment Operator Unary operator Ternary or Conditional Operator Misc Operator Arithmetic Operators: These operators are used on […]

September 24, 2022 | C++ | No comments

Advertisement