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 > Beginners Lab Assignments Code Examples

Swapping Two Numbers Using Variable in C





Perform Edge coloring on Complete graph - This algorithm takes the input of the number of vertexes. Construct a complete graph for v vertex. So it assigns a color to edges without assigning the same color to 2 adjacent edges.

C++ Multiply Two Matrices use 2D Arrays - C++ Code is very simple it takes input in two 2D arrays each with size of 2X2. After taking the input program "multiply two matrix" in 3 nested for loops. Size of arrays is defined use

C++ Find the HCF and LCF of 2 Numbers - Enter the two number, to find the HCF and LCF of the given two number to display the value of the HCF and LCM of the 2 numbers on the output screen as shown here in code

C++ Displays such a Pattern for n Number - C++ Program to display 'such a Pattern'. Each row will contain odd numbers of number. The first and last number of each row will be 1 and middle column will be the "row number". So n

C Prints Even or Odd Numbers in a Range - First give a meaningful name to the recursive function to print even odd numbers. Let's say printEvenOdd(). This function can print both even as well as Odd Numbers in given range.

Program Code find First Digit of a number - Finding the first digit of any number is little expensive than last digit. To find first digit of a number we divide the given number by 10 until number is greater than 10. At the end...

Read an Array and Search for an Element - C code accept an array of N elements and a key to search. If the search is successful, it displays "Successful Search". Otherwise, a message "UNSUCCESSFUL SEARCH" is...

C++ Detecting a Keypress and ASCII Code - Program which detects a key pressed and its 'ASCII' value with out pressing enter key and using cin>> on press Esc key program should exit. When press a key its ASCII value should