Happy Codings - Programming Code Examples
Html Css Web Design Sample Codes CPlusPlus Programming Sample Codes JavaScript Programming Sample Codes C Programming Sample Codes CSharp Programming Sample Codes Java Programming Sample Codes Php Programming Sample Codes Visual Basic Programming Sample Codes

C Programming Code Examples

C > If Else and Switch Case Code Examples

C program to find maximum between two numbers using switch case

C Evaluate the Given Polynomial Equation - C program to evaluate a given polynomial by reading its coefficients in an array. Formula is P(x)=AnXn + An-1Xn-1 + An-2Xn-2+... +A1X + A0. The 'polynomial' can be written as: P(x) =

Exception Handling Multiple Catch in C++ - In C++ code, 'Declare and define' the function test(). Within the try block check whether the value is 'greater than zero' or not. If the value greater than zero 'throw the value' and catch

C++ Program to Implement Selection Sort - This C++ program sample sort the given data using Selection Sort. Selection sort algorithm sort data by comparing one element to every other element & decide its position. The time

Program Code to Implement CockTail Sort - C Program implements cocktail sort. Cocktail sort is a variation of bubble sort that is both a stable sorting algorithm & a comparison sort. The algorithm differs from a "Bubble Sort" in

Perform Exception Handling for Divide by - Declare the variables a,b,c. Read the values. Inside the "try block" check the condition. (a. if(a-b!=0) then "calculate the value" of d and display.b. otherwise throw the exception. So

Converts Hexadecimal to Binary Numbers - Hexadecimal to Binary conversion is divided in 3 steps. Extract each hex digits separately. Find the Binary of each extracted Hex digit. Store the binary equivalent of extracted hex

Print Combination of 2 Words of 2 Strings - Print combination of two words of two given strings without any repetition. Incrementing the count if the characters of the main string match with the characters of the given word.

C Code Reads two Strings & Concatenates - C program Read two strings and Concatenate them, without using library functions. Display the 'Concatenated String'. Take two strings as input and store them in the arrays string1 and