C Programming Code Examples
C > Beginners Lab Assignments Code Examples
program to perform input output of all basic data types
Reversing Position of all Digits of Number -
For example reverse of 849 is 948. This code is write using for loop, 'Modulus Operator', if condition statement. User enter any number. 'Receive integer' value from user. Then check
C Language Finding the Sum of A.P Series -
Program calculates the the sum of A.P series. This C program is used to find the sum of the "Arithmetic Progression Series" and Here A.P stands for Arithmetic Progression. Sequence
C Program Codes Finds Area of Trapezium -
C Language program to calculates the area of trapezium. The Formula used in this program are Area = (1/2) * (x + y) * h where x and y are the Two Bases of Trapezium & h is the height.
C++ Codings Store & Display Information -
Program stores the information (name, roll & marks) of 10 students using structures. In this program, a structure, student is created. This structure has three members: name ('string'),
C Sum of the Main and Opposite Diagonal -
C Program code finds the sum of the main & opposite diagonal elements of a MxN Matrix. The program accepts an MxN matrix. Then adds main diagonal of matrix as well as the
Insertion Sort Algorithm in C++ Language -
Insertion sort is simple sorting algorithm that builds the final sorted array ('or list') one item at a time. It is much less efficient on large lists than more advanced algorithms such as quick
Copy all Elements of one array to another -
Program code to read elements in array and copy all elements of first array into second array. C program to copy elements of array. Input size and elements in array, store it in
Add 2 Distances System Using Structures -
A "Structure Distance" containing two data members (inch and feet) is declared to store the distance in inch-feet system. Here, two structure variables d1 and d2 are created to