 # C Programming Code Examples

## C > Beginners Lab Assignments Code Examples

### program to find diameter, circumference and area of circle

C Codings to HCF Highest Common Factor - Program to Find HCF In C language. An H.C.F or Highest Common Factor, largest common factor of two or more values. For example 12 > 1, 2, 3, 4, 6, 12 and 18 > 1, 2, 4, 8, 18. HCF=4

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

C++ Program Find Quotient & Remainder - In program, user enter 2 integers (divisor and dividend), computes quotient and remainder. To compute 'quotient and remainder', divisor and dividend should be integers. The division

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

C Program to causes the function pointed - C Programming Causes the function pointed to by func to be called upon normal program termination. Returns zero if the function is successfully registered as a termination and...

C Program Computes Factorial of number - The Factorial of a Positive Number n is given by: factorial of n (n!) = 1*2*3*4...n. Factorial of a negative number doesn't exist. And, the factorial of 0 is 1, 0! = 1. The program takes a

C Program to Print Sum of Array Elements - In C, we are setting up the pointer to the base address of array and then we're incrementing pointer and using * operator to get & sum-up the values of all the array elements. Enter the

C++ Finds All Roots of Quadratic Equation - Program accepts "coefficients" of a quadratic equation from the user and displays the roots (both real and complex roots depending upon the discriminant). 'ax^2+bx+c = 0' (where a, b,