C Programming Code Examples
C > Beginners Lab Assignments Code Examples
Program to Calculate the Sum of Odd & Even Numbers
C++ Code Add Two Matrix with 2D Arrays -
2 const variables row & col are used to define size. If we do not make both const then error found because without "const reserve word" they are behaving as variable. Before placing
Calculates the Mean Variance & Deviation -
This C Program calculates the mean, variance and standard deviation. The formula which is used in this c program are mean = average of the numbers. var=(summation( ( Xj - average
C Programming Sample Reading the Files -
To read the file in C Language, we must open it first using any of the mode, for example if you only want to read the file then open it in "r" mode. Based on the mode selected during
The C++ Shortest path program using STL -
Process a request; return false if end of file. A simple main that reads a file given by argv[1] and then calls "processRequest" to compute shortest paths. Then 'Skimpy' error checking
Multiline Comments in C++ programming -
To write a "Multiline Comment" you have to write "/*" at the start of the Comment. After this you can write as many number of lines of description. When you are done with writing
Check the Alphabet is Vowel or Consonant -
C program takes the Character value as input and checks whether that character is a vowel or consonant using if-else statement. Since a user allowed to enter an alphabet Lowercase
Code Swap first and last digit of a number -
C program to input a number from user and swap first and last digit of the given number. Input number from user, find last digit, find total number of digit - 1, find first digit. How
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