Posts from C++

How to find first index of an integer in an array in C++

By Bhargav

In this tutorial, you will learn how to write a program to find the first index of a number in an array in C++. The first index of a number is the index value when the number appea.... Read More

Max Operator function in C++

By Joyeeta Choubey

Hello folks! In this tutorial, we are going to learn and implement the max operator function in C++.  So let’s know a bit about what is max operator function (std::max) in C.... Read More

Tilde Operator in C++

By Raghav Khandelwal

In this tutorial, we will learn about the tilde (~) operator in C++.  In C++ there are a total of 6 bitwise operators which are &(bitwise AND), |(bitwise OR), ^ (bitwise XOR),.... Read More

Remove empty elements from an array in C++

By Gagan Gupta

In this tutorial, we will learn to write the code on how to remove empty elements from an array in C++ programming. CODE #include <bits/stdc++.h> using namespace std; string .... Read More

Give a warning for invalid input in C++

By Raghav Khandelwal

In this tutorial, we are going to learn how to give a warning when the user enters invalid input. In C++ while writing programs we use std::cin to ask the user to enter the input. .... Read More

Check if a given number exists in an array in C++

By Gagan Gupta

In this tutorial, we will learn how to check whether a given number is present in an array in C++. #include<iostream> using namespace std; int main() { int array[6]={1,2,3,4,.... Read More

Pick a random card from a deck of cards in C++

By Gagan Gupta

In this tutorial, we will learn to write code to pick a random card from a deck of cards in c++ #include <iostream> #include <cstdlib> //for rand and srand #include <.... Read More

Print deck of cards in C++

By Gagan Gupta

In this experiment, we will learn how to print the deck of cards in C++ language. #include<iostream> #include<string> using namespace std; int main(){ std::string cards.... Read More

Related Posts