# C Programming Code Examples

## C > Beginners Lab Assignments Code Examples

### multiple if statements in C programming language

Find GCD of the Numbers Using Recursion -
C Language program, use recursion, finds the GCD of the two numbers entered by the User. The user enters 2 numbers by using a space in between them or by pressing enter after each

C++ Language Samples Separate Chaining -
Internal method to test if a positive number is prime. Not an efficient algorithm and Internal method to return a 'prime number' at least as large as n. Assumes "n > 0". Insert item x into

Finds the Longest Increasing Subsequence -
This is a C++ Program to implement LCS. The longest common subsequence (LCS) problem is to find the "longest subsequence common" to all sequences in a set of sequences. Classic

C++ Compute Combinations by Factorials -
Prints a total number of combination possible for given n and r value. The "time complexity" of this algorithm is O(n). This algorithm takes the input of n and r value. Function to find the

C++ Program to Implement Counting Sort -
In c++ sort pogram sample, count the number of 'occurrences' of each element. And store it in the Array of size same as the range of data input. Use element value to refer the counter

C Coding Implement Queues using Stacks -
C language program code to ask the user for the operations like insert, delete and display. According to the entered option access the respective function using switch statement.

Frequency of Characters in a C-style String -
In this example, 'frequency of characters' in a String object is computed. To do this, "size()" function is used to find the Length of a string object. Then, the for loop is iterated until the

Code Count number of digits in an integer -
C language program to input a number from user and count number of digits in the given integer using loop. First logic is the easiest and is the common to think. It uses loop to