# C Programming Code Examples

## C > Beginners Lab Assignments Code Examples

### convert temperature from degree fahrenheit to celsius

Reads Strings from a File in Reverse Order -
Program code to find out how many strings there are. Read string length. Check buffer is large enough and increase if necessary. Now get the position for the beginning of each...

Program Find GCD (HCF) of Two Numbers -
Recursive function in C language to find GCD (HCF) of two numbers. Find GCD ( Greatest Common Divisor ) or HCF ( Highest Common Factor ) of two numbers using recursion in C

Program Implement a Stack by Linked List -
This Program implement a stack using linked list. A Stack is a type of queue that in practice is implemented as area of memory that holds all local variables and parameters used by any

Convert Decimal number to Octal Number -
Accept the given decimal number. If number is less than 8 the octal number is the same. If the number > 7 then Divide the number with 8. Write down the remainder. Do steps 3 and

Toggle Case of Each Character in A String -
C program to 'toggle case' of each characters of a string using loop. Logic to toggle case of a 'given string'. Input string from user, store it in some variable say str. Run a loop from start

Code Extract Last Two Gigits of the year -
This c language program takes any year as input and prints its last two digits. Take any year as input. Divide the input by 100 and obtain its remainder. The remainder got is

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

C Program to Find Sum of Array Elements -
Find Sum of Array elements Using Recursive function in C language. Function declaration to find sum of array. Input size and elements in array. Recursively find the sum of elements