Skip to content

Category Archives: C++ Programs

Stringstream is stream class present in C++ which is used for doing operations on a string. It can be used for formatting/parsing/converting a string to… Read More
C++ program for printing the range data type like int, char, short. Signed Data Types METHOD 1.) calculate total number of bits by multiplying sizeof… Read More
The below implementation is to generate random number from 1 to given limit. The below function produces behavior similar to srand() function. Prerequisite : random… Read More
Given the value of n, i.e, the number of rows/columns for a square, print the pattern.Examples :   Input : n = 8 Output : *… Read More
Given the value of n, i.e, the number of rows/columns in a square, print the pattern.Examples :   Input : n = 8 Output : 0… Read More
Given a number n, the task is to find the even factor sum of a number. Examples: Input : 30 Output : 48 Even dividers… Read More
Prerequisite : Switch Case in C Problem Statement: Write a menu-driven program using Switch case to calculate the following: 1. Area of circle 2. Area… Read More
For a given value N, denoting the number of Charters starting from the A, print reverse character bridge pattern.Examples :   Input : n = 5… Read More
Prerequisite : rand() and srand()  Given all alphabets in a character array, print a string of random characters of given size.We will use rand() function… Read More
Given a character, we need to print its ASCII value in C/C++/Java/Python. Examples : Input : a Output : 97 Input : DOutput : 68 Here… Read More
Write a program to find the length of a string using pointers. Examples: Input : given_string = “geeksforgeeks”Output : length of the string = 13… Read More
Given a positive integer N. The task is to find 12 + 22 + 32 + ….. + N2. Examples: Input : N = 4… Read More
Prerequisite – fork() in C, sorting in fork() Problem statement – Write a program to search the key element in parent process and print the… Read More
Given two integers N and M. Consider two matrix ANXM, BNXM. Both matrix A and matrix B contains elements from 1 to N*M. Matrix A… Read More
Prerequisite: Command_line_argument. The problem is to find the largest integer among the three using command line arguments. Notes: Command-line arguments are given after the name… Read More

Start Your Coding Journey Now!