C Program to Print Pascal’s Triangle
Write a C/C++ Program to Print Pascal’s Triangle. It can be implemented using 1D Array, 2D Array, Jagged Array and recursion.
c++ Concepts
Write a C/C++ Program to Print Pascal’s Triangle. It can be implemented using 1D Array, 2D Array, Jagged Array and recursion.
Character array to Int. Write a C/C++ Program to convert char array (string) to integer. Program of string to int conversion in c/c++
Write a C/C++ program to Convert Octal Number to Decimal Number. Algorithm to convert given octal number to decimal number.
Hex to Decimal Conversion Program in C. Write a C Program to Convert Hexadecimal Number to Decimal Number. Take input as string.
Write a C Program to Print Diamond Pattern.Write Program to Print Diamond Pattern in C and implement it using both loop and recursion.
Write a Program to Find the Factorial of a number in C. Example, Input: 5Output: 120 Factorial can be calculated in 2 ways Factorial using Loop (Iteratively) Factorial using recursion (recursively) Factorial Program in C Using Loop (Iterative method) We can use for-loop, while-loop or do-while loop. Factorial Program in C using for-loop Factorial Program …
Learn to Initialize 2D vector in c++. Initialize 3D vector in c++, Initialize 2D, 3D vector and fill all positions with same value.
Write a C Program to find maximum between 3 numbers. We will learn how we can find the maximum of 3 numbers in c/c++. The code will work in all languages with few modifications. Prerequisite Knowledge Relational Operator Ternary/Conditional Operator if..else Statement Basic C/C++ Programming knowledge The problem can be solved in various way. We …
Write a C Program to find maximum between 3 numbers. Read More »
Write a Program to Reverse an Array in c/c++. It can be done 2 ways, using Recursion (recursively) and without using recursion (iteratively).
The C++ STL function sort() by default sorts the array in ascending order. If we want to sort array in descending order using sort(), we need to use a Comparator Function. Syntax Sort Array in Descending Order Using sort() We can use the inbuilt greater<type>() function to arrange array in descending order. greater<type>() compares the …
How to sort an array in descending order using sort() in c++? Read More »