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 > Code Snippets Code Examples

read input





Program Code Find Factorial of a Number - Program to input a number and calculate its factorial using for loop. Factorial of a number n is product of all positive integers less than or equal to n. It is denoted as n!. ex. 5! = 120

Program Count No of Lines & Blank Lines - Open the file and point it to the file pointer fpoint1. Initialize the variables line_count, n_o_c_l, n_o_n_b_l, n_o_b_l, n_e_c to zero. Using while loop read the next line character

Program Finds Sum of First and Last Digit - C Language Program to input a number and find sum of first and last digit of the number using for loop. Input a number. Find last digit. Find total number of digits - 1. Find first digit.

Program code to Reverse a Given Number - Take the Number which you have to Reverse as the input. Obtain its quotient & remainder. Multiply the separate variable with 10 & add the obtained remainder to it. Do step 2 again

Code to find the Frequency of Odd & Even - Program code finds frequency of odd & even numbers in the given matrix. The program first accepts the matrix. Then finds the odd and even numbers in a matrix. Then finds the

Find Maximum Numbers of Edge Disjoint - C++ program displays the maximum number of edge disjoint paths present between two vertices. 'Maximum number' of edge disjoint paths refers to the maximum flow or shortest

Writing Comment in C program examples - Commenting in C programming language. This is a using single line comment example. This is a using mult-line comment. Slash that's not a commment, divide operator...

Program to Create Your Own Header File - Program to create your own header file in c programming. Write only function definition as you write in c program. Save above code with extension. Let name of our header file