# List of Sample Programs in C Programming Language

C Programming via Sample Programs, theory, codes, algorithm, flow chart and output

Presented here are 12 Lab works in C programming language and each lab work consists of one or more objects. Alltogether 24 objects or programs have been presented here.

Errors have been tried at their max to be eliminated however you must accept if any. Please, note that all this work is the raw presentation of the classroom assignment in computer programming for basic learners or beginner engineering students.

Each object or program presented here contains  background theory algorithm/pseudocode flow chart object code sample output and  inferences drawn including error messages if any.

These programs were initially published at http://gearshifts.googlepages.com/cprog.html and are Linked at EntranceNepal.com, i-geek blog & Ekendra’s Share World

Lab 1:

Object I. Exercise on writing, compiling and executing a sample program in C.

Lab 2:

Object: I. To perform Arithmetic Operations

Object: II. To convert Centigrade to Fahrenheit Scale

Lab 3:

Object: I. To write a program to identify the greater number between any 2 given numbers.

Object: II. To write a program to find the greatest of the three given numbers

Lab 4:

Object: I. To write a program to calculate roots of a quadratic equation ie ax2+bx+c=0.

Lab 5:

Object I. To write a program to display even and odd numbers from 1 and 100.

Object II. To write a program to display the factorial of a given number.

Object III. To write a program to display the Fibonacci series.

Object IV. To write a program to find whether the given number is prime.

Lab 6:

Object I. To write a program to display a set of data into ascending and descending order.

Object II. To write a program to add two matrices.

Lab 7:

Object I. To write a program to multiply two given matrices.

Lab 8:

Object I. To write programs to read character and convert it into upper case if it is in lower and vice-versa.

Object II. To write programs to read string and convert it into upper case if it is in lower and vice-versa.

Lab 9:

Object I. To write programs, using pointer, that takes three variables a, b, c and rotates the value stored such that value a goes to b, b to c and c to a.

Object II. To write to a program to find the largest of a given set of numbers using pointer.

Lab 10:

Object I. To write Program to perform arithmetic assignments using function

Object II. To write to display reverse of a given number using function

Object III. To write a program to calculate factorial of a given number using recursive function

Lab 11:

Object I. To write a program to sort an array in ascending orders using function and pointer.

Object II. To write a program using structure to read records of 3 students and print the records.

Lab 12:

Object I. To write a program to check whether the given string is palindrome.

Object II. To modify the program # lab report 11.2 such that it uses pointer to structure instead of structure itself.

Home | Lab 1 | Lab 2 | Lab 3 | Lab 4 | Lab 5 | Lab 6 | Lab 7 | Lab 8 | Lab 9 | Lab 10 | Lab 11 | Lab 12