 # C Programming Code Examples

## C > Beginners Lab Assignments Code Examples

### program to find power of a number using pow function

``` program to find power of a number using pow function Write a C program to input two numbers from user and find their power using pow() function. How to find power of a number in C programming. How to use pow() function in C programming. #include <stdio.h> #include <math.h> // Used for pow() function int main() { double base, expo, power; /* Input two numbers from user */ printf("Enter base: "); scanf("%lf", &base); printf("Enter exponent: "); scanf("%lf", &expo); /* Calculates base^expo */ power = pow(base, expo); printf("%.2lf ^ %.2lf = %.2lf", base, expo, power); return 0; } ```

Dictionary implimentation by Binary Trees - In C++, where first, the 'dictionary' is created by taking an input by the user for the words and their meanings. Next, these are stored in a "Binary Search Tree", after which the file is

C Programs Calculates Standard Deviation - C Language calculateSD() function calculates the Standard Deviation. The array containing 10 elements is passed to the function and this function calculates the Standard Deviation &

Program Code Calculates the Value of nPr - C Program code calculates the value of nPr. A permutation is a re-arrangement of elements of a set. And any duplications of the collected elements in different orders is allowed. Then

Counts Leading Zeros in a Binary Number - Find total leading zeros of a given number (in binary representation) using bitwise operator in C programming. Write a C program code to input any number from user and find total

C Program Code Finds Area of a Rectangle - Input length and width of a rectangle and find area of the given rectangle. How to calculate area of a rectangle in C programming. Input length and width of rectangle. Store it in two

Copy all elements of an array into another - C Programming copy all elements of an array into Another array. Accepting values into Array. Copying data from array 'a' to array 'b. Printing of all elements of array. Print the...

Code Searchs for an Element in Linked List - C program search for an element in the linked list using recursion. Uses recursive function & search for an element in a Linked List. Linked List is an Ordered set of Data Elements, each

C Programming Language Mode Program - C In Statistics Maths, a mode is a value that occurs the highest numbers of time. Example assume a set of values 8, 5, 4, 7, 8. mode of this value set is 8 as it appears more than any