C Programming Code Examples
C > Beginners Lab Assignments Code Examples
C Programming Causes the function pointed to by func to be called upon normal program termination. Returns zero if the function is successfully registered as a termination and...
Arithmetic operator performs mathematical operations such as addition, subtraction and multiplication on numerical values (constants and variables). C Program to demonstrate...
C Programming to assignment operators. An Assignment Operator is used for assigning a value to a variable. C code demonstrate the working of assignment operators. The most
C an expression containing Logical Operator returns either 0 or 1 depending upon whether expression results true or false. C Program to demonstrate working of logical operators...
C code three variables entered by the user are stored in variables x, y and z respectively. Then, these variables are passed to function cyclicSwap(). Instead of passing the actual...
Take the height of a person as input and store it in the variable height. If the variable height is lesser than 150 cm, then print the output as "Dwarf". If the variable height is lesser than...
In this c program code, a structure Distance is defined. The structure has two members inch (a float) and feet (an integer). Two variables (distance1 and distance2) are created which...
C program code input two numbers from user and calculate their sum. C program to add 2 numbers and printing their sum as output. How to add two numbers in C programming.
C Program to Build Binary Tree if inorder or postorder traversal as input. Create a new node. Create a balanced binary search tree. Insert a node in the tree. Create a node and
C Programming code input principle amount. Store it in some variable say principle. Input time in some variable say time. Input rate in some variable say rate. Calculate compound
C programming code to calculate difference between two time periods. In this program, user is asked to enter two time periods and these two periods are stored in structure...
C code example to input principle amount in some variable say principle and input time in some variable say time. Input rate in some variable say rate. Find simple interest using
C structure is collection of elements of the different data types. Size of the structure can be evaluated using "sizeof operator". Sizeof is operator not function. Sizeof operator takes
C program code find the sum of odd and even numbers from 1 to N. Take Number N upto which we have to find the sum as input. Using for loop take the elements one by one from 1
Input marks of five subjects of a student and calculate total, average and percentage of all subjects. Calculate total average percentage in C programming. Find total, average and...
C program code input a character and check whether the character is alphabet or not using Conditional/Ternary operator ?:. How to check alphabets by conditional operator...
C programming code to input a number and check whether number is even or odd using Conditional/Ternary operator ?:. Check even or odd numbers using conditional operator...
C program code takes a expression as input and checks if the expression is correctly parenthesized. Take a expression as input and store it in the array. Check for the "(" ...
C Programming Language input a year and check whether year is leap year or not using conditional/ternary operator ?:. How to check leap year using conditional operator in C. If a
Program example identify whether the string is palindrome or not using stack. Take a string as input. Store the string in the stack array. Check whether the string is palindrome or...
C Program take the integer as input. Divide the input integer by 10, obtain its remainder and quotient. Increment the new variable with the remainder got at step 2. Repeat the
C Program Code input Length in centimeter and convert it to meter and kilometer. How to convert length from centimeter to meter and kilometer in C. Input length centimeter
C program to input number of days from user and convert it to years, weeks and days. How to convert days to years, weeks in C. Input days from user. Store it in some variable say...
Input temperature in Centigrade and convert to Fahrenheit. How to convert temperature from degree centigrade to degree Fahrenheit in C programming. The logic of temperature
C programming code to input temperature in degree Fahrenheit and convert it to degree Centigrade. Code convert temperature from Fahrenheit to Celsius in the C programming.
C create a new node with the data from the user. Check for root node and then create it. Search for the appropriate position to insert the new node. Display and count the sum of
C Program Display the Nodes of a Tree using BFS Traversal. Breadth-first search (BFS) is a strategy for searching in a graph when search is limited to essentially two operations: (a)...
Page 1 Page 2 Page 3 Page 14