×
Home Discussions Write at Opengenus IQ
×
  • DSA Cheatsheet
  • HOME
  • Track your progress
  • Deep Learning (FREE)
  • Join our Internship 🎓
  • RANDOM
  • One Liner

Software Engineering

Software Engineering is the fastest growing domain which is related to the art of building and designing systems using software concepts and programming. It is the basis of giant companies such as Microsoft, Google, Facebook, Baidu, Alibaba, Apple and others.

C++

Reader Writer Problem in C++ using semaphore and monitor

We will focus on solving the Reader Writer problem in C++ by using Semaphores as our first approach and Monitors as our second approach. It is a problem designed to illustrate synchronization within processes.

Kavita Bisht
C Programming

do while loop in C

Do while loop in C is an exit controlled loop and hence, it executes at least once even when the test-expression is false initially. We illustrate the concept and usage in C with different examples

Shreya Rastogi
C++

Factory Pattern in C++

Factory method also known as a static class is a creational design pattern, i.e. it is related to object creation. In this we create object without exposing the creation logic to client and the client use the same common interface to create new type of object. Idea is to use a static member function

Harshita Sahai Harshita Sahai
C Programming

While loop in C

Order execution of while loop in C is control variable is initialized, test expression is evaluated, if it evaluates to true, the loop enters the body and it is repeatedly executed, till the expression does not evaluate to false. When the test expression evaluates to false, the loop is exited.

Shreya Rastogi
C++

constructor in C++

A constructor is a member function of a class which initializes objects of a class. In C++, Constructor is automatically called when object(instance of class) is created it is considered to be a special member function of the class.

Harshita Sahai Harshita Sahai
Python

Range Function in Python

Range is an inbuilt function in python that is generally used to create a sequence of numbers. It can accept upto three arguments to modify the output accordingly We will look into its functionalities and any limitations that range has. Let's start from basics and build up our understanding of range

Sonal Agrawal Sonal Agrawal
C++

delete operator in C++

In C++, Delete is an operator that is used to destroy array and non-array(pointer) objects which are created by new operator as well as NULL pointers. Using operator overloading, we can delete user defined objects as well

Harshita Sahai Harshita Sahai
C++

new operator in C++

In C++, the new operator denotes a request for memory allocation on the Heap. If sufficient memory is available, new operator initializes the memory and returns the address of the newly allocated and initialized memory to the pointer variable.

Harshita Sahai Harshita Sahai
Java

do while loop in Java

A do-while loop is similar to a while loop, except the fact that it is guaranteed to execute at least one time. The do-while loop checks its condition at the bottom of the loop after one time execution of do and hence, is an exit control loop. It is slower than for and while loops in Java

OpenGenus Tech Review Team OpenGenus Tech Review Team
Software Engineering

while loop in Java

A while loop is an entry controlled control flow statement that allows code to be executed repeatedly based on a given condition. In Java, while loop is widely used. On benchmarking the performance, we see that while loop is slower than for loop but is two times faster than do while loop.

OpenGenus Tech Review Team OpenGenus Tech Review Team
Java

Postfix (i++) vs Prefix (++i) increment in Java

i++ is known as postfix increment operation while ++i is known as prefix increment operation. We compare these two operations based on Use/ Program flow, Compiler instruction and Benchmark. We demonstrate that ++i is significantly faster than i++ in Java.

OpenGenus Tech Review Team OpenGenus Tech Review Team
Java

i++ vs i=i+1 in Java

Often, i++ and i=i+1 are considered to be same statements but in Java, both statements work differently internally. We will take a look at The compiler instructions used, Typecasting along with the operations and benchmarking the two operations. We see that i=i+1 is always faster than i++.

OpenGenus Tech Review Team OpenGenus Tech Review Team
Java

for loop in Java

for loop is an entry controlled loop that is widely used in Java programming language. Loops are used to repeat a particular coding task where each repetition follows a particular pattern which can be incorporated in a code. We provided several Java examples to demonstrate the concept

OpenGenus Tech Review Team OpenGenus Tech Review Team
Python

Reading and Writing Text Files in Python

This post will cover how to work with text files specifically in Python. We covered Opening a file, Reading a file: read() and readlines(), Writing to files, keeping track of pointers: tell() and seek(), Closing a file and File attributes

Sonal Agrawal Sonal Agrawal
Python

if else statement in Python

We will take a deep look into if else, else if (elif), nested if else and the possible condition statements used in if else in Python. if else is a program control statement and is widely used in almost all programming languages

Sonal Agrawal Sonal Agrawal
C++

Classes and Objects in C++

In C++, a class is a mechanism for creating user-defined data types. A class is used to specify the form of an object and it combines data representation. The variables inside class definition are called as data members and the functions are called member functions.

Kavita Bisht
C++

Scopes in C++

Scope is defined as the extent to which something can be worked with (or a scope is a region of the program ). In C++, there are 9 types: Global scope, Local scope, Namespace scope, Class scope, Statement scope, Function scope, Function parameter scope, Enumeration scope and Template parameter scope

Kavita Bisht
C++

Priority Queue in C++ STL

Priority queue in the STL of C++ is a dynamically resizing container to implement the special case of priority queye under the queue data structure. It is a sequential linear container. The top element of the priority queue is the greatest with all elements arranged in non-increasing order.

Arvind Tatiparti
C++

Queue in C++ STL

Queue in the STL of C++ is a dynamically resizing container to implement the queue data structure. It is a sequential linear container which follows the First In First Out(FIFO) arrangement. We explore the various functions like empty, size, swap, emplace, front, back, push and pop operations

Arvind Tatiparti
Python

Tuple in Python

Tuples in Python are used to hold together multiple objects. Tuples are defined by specifying items separated by commas within an optional pair of parentheses. Any set mutiple comma-separated symbols written default to tuples. Tuples are immutable

Shreya Gupta Shreya Gupta
C++

Virtual Function in C++

A virtual function in C++ is a member function which is declared within a base class and is overriden by a derived class. When you refer to a derived class object using a pointer or a reference to the base class, you can call a virtual function for that object and execute the derived class function

Harshita Sahai Harshita Sahai
C++

Vector in C++

Vector is a sequence container that can store elements, but its size can change dynamically (C/C++ array’s size do not change dynamically). We can store int, string, float elements, depending on how we initialize the vector.

Shreya Gupta Shreya Gupta
C++

Inheritance in C++

Inheritance in C++ allows us to define a class in terms of another class, which makes it easier to create and maintain an application. This provides an opportunity to reuse the code functionality. Single, multiple, hierarchical, multilevel, multipath and hybrid inheritance is supported in C++

Kavita Bisht
C Programming

continue statement in C

The continue statement is a jump statement in C. It is another one of the jump statements like the break statement as both the statements skip over a part of the code. But the continue statement is somewhat different from the break statement. It forces the next iteration of the loop to take place

Shreya Rastogi
C++

Namespace in C++

Namespaces in C++ allow us to group named entities that otherwise would have global scope into narrower scopes, giving them namespace scope. This allows organizing the elements of programs into different logical scopes referred to by names.

Harshita Sahai Harshita Sahai
OpenGenus IQ © 2025 All rights reserved â„¢
Contact - Email: team@opengenus.org
Primary Address: JR Shinjuku Miraina Tower, Tokyo, Shinjuku 160-0022, JP
Office #2: Commercial Complex D4, Delhi, Delhi 110017, IN
Top Posts LinkedIn Twitter
Android App
Apply for Internship