Chandu yadav has Published 1091 Articles

How to find Square root of complex numbers in Python?

Chandu yadav

Chandu yadav

Updated on 30-Apr-2025 13:06:05

637 Views

Complex numbers are numbers that have both real and imaginary components in the structure,  a+bi. You can find the square root of complex numbers in Python using the cmath module. This module in Python is exclusively used to deal with complex numbers.Square Root of Complex Numbers Using cmath.sqrt() The cmath.sqrt() ... Read More

C++ Scope resolution operator

Chandu yadav

Chandu yadav

Updated on 29-Apr-2025 19:03:47

24K+ Views

C++ scope resolution operator is used to access the variables, functions, and classes which are defined outside the current scope.What is Scope Resolution Operator (SRO) in C++?In C++, scope resolution operator is used to define a function outside the class and used to access the static variables of class. It ... Read More

C++ Program to Solve Knapsack Problem Using Dynamic Programming

Chandu yadav

Chandu yadav

Updated on 29-Apr-2025 15:56:46

16K+ Views

In the 0-1 knapsack problem, a set of items is given, each with a weight and a value. We need to determine the number of each item to include in a collection so that the total weight is less than or equal to the given limit and the total value ... Read More

fabs() in C++

Chandu yadav

Chandu yadav

Updated on 29-Apr-2025 11:32:37

602 Views

In C++, fabs is used to calculate the absolute value of a floating-point number. It is a function and defined to a header file. The fab() FunctionThis fabs() function accepts one argument, which is a floating-point number (double, float, or long double), and returns its absolute value as ... Read More

How do malloc() and free() work in C/C++?

Chandu yadav

Chandu yadav

Updated on 28-Apr-2025 18:21:44

2K+ Views

Both malloc() and free() are used to manage memory at runtime. The malloc() is very useful because it allocates memory based on the program needs, while free() releases the memory. But the free() can lead to memory leakage, which is one of its disadvantages. What is malloc()? The function malloc() ... Read More

C++ Program to Implement Max Heap

Chandu yadav

Chandu yadav

Updated on 07-Mar-2025 15:35:32

14K+ Views

In this article, we will write a C++ program that implements a Max Heap. A Max Heap is a binary tree where the value of each node is greater than or equal to the values of its children. We will explain how to create a Max Heap using arrays and ... Read More

How to print out the contents of a vector in C++?

Chandu yadav

Chandu yadav

Updated on 14-Feb-2025 18:05:07

35K+ Views

Vectors are similar to the dynamic arrays but vectors can resize. They are sequence containers that can change their size according to the insertion or deletion of elements. Containers are the objects which holds the data of same type. Vectors may allocate some extra storage for the future growth of ... Read More

Java program to deselect a range of columns in a JTable

Chandu yadav

Chandu yadav

Updated on 14-Nov-2024 17:36:26

193 Views

In this article, we will learn how to deselect a range of columns in a JTable using Java. JTable is a part of the Swing framework in Java, which is used to display and edit tables. Sometimes, we may want to deselect a specific range of columns after selecting columns ... Read More

Compilation and Execution of a C# Program

Chandu yadav

Chandu yadav

Updated on 15-Oct-2024 17:48:01

21K+ Views

To compile and execute a program in C#, you just need to click the Run button or press F5 key to execute the project in Microsoft Visual Studio IDE. Compile a C# program by using the command-line instead of the Microsoft Visual Studio IDE − Open a text editor ... Read More

Java program to check occurrence of each vowel in String

Chandu yadav

Chandu yadav

Updated on 15-Oct-2024 11:51:21

4K+ Views

To count occurrences of vowels in a string again use the Map utility of Java as used in calculating the occurrence of each character in the string. Put each vowel as a key in Map and put the initial value as 1 for each key. Now compare each character with ... Read More

1 2 3 4 5 ... 110 Next
Advertisements