C++ Programming Code Examples
C++ > If Else and Switch Case Code Examples
Check Original Equal Reverse or Not
Insertion Sort Algorithm in C++ Language -
Insertion sort is simple sorting algorithm that builds the final sorted array ('or list') one item at a time. It is much less efficient on large lists than more advanced algorithms such as quick
Multiple Initialization Inside For Loop in C -
1. It is initializing two variables. Note: both are separated by comma (,). 2. It has two test conditions joined together using AND (&&) logical operator. You cannot use multiple test
C++ Solving The Dominating Set Problem -
Problem takes 'E edges' as input and outputs dominant set of the graph, implementing the following heuristic. Dominant set of a graph's to find, a set of vertices S, such that for every
Code Get Highest Order Set Bit of Number -
Highest position of a set bit from left to right in a number is said to be highest order set bit of that number. Highest order set bit of any negative integers is 31. Since, highest order...
C Code Sorts Set of Strings in Alphabetical -
In this program, user would be asked to enter a set of Strings and the program would sort & display them in Ascending alphabetical order. This C program would sort the input strings in
C Program Find Day when a Date is given -
Don't U know that there is no month greater than 12. Enter valid month Once again enter the Date Month Year. Fool, Invalid date in February of non leap year. The maximum...
Find the First Capital Letter in String Using -
C program code to find the first Capital letter that exists in string, using recursion. We have included ctype.h in order to make use of "int isupper(char);" function that's defined inside
C Demonstrate Printf inside another printf -
Firstly Inner printf is executed which results in printing 1324. Printf returns total number of digits i.e 4 and second inner printf will looks like. It prints 4 and returns the total number.