Write a c program to illustrate use of data type enum. CSE January 12, 2026 #include <stdio.h> #include <string.h> // Example 1: Days of the week (default values: 0, 1, 2, ...) enum Days { SUNDAY, ... Continue Reading
Write a c program that opens an existing text file and copies it to a new text file with all lowercase letters changed to capital letters and all other characters unchanged. CSE January 12, 2026 #include <stdio.h> #include <ctype.h> #include <stdlib.h> int main() { FILE *sourceFile, *destFile; char sourceFi... Continue Reading
Write a C program to create a structure Student containing fields for Roll No., Name, Class, Year and Total Marks. Create 10 students and store them in a file. CSE January 12, 2026 #include <stdio.h> #include <string.h> // Structure definition struct Student { int rollNo; char name[50]; char cla... Continue Reading
Write a program to demonstrate the call by value and the call by reference concepts in c. CSE January 12, 2026 #include <stdio.h> // Call by Value - receives copy of arguments void swapByValue(int a, int b) { int temp; printf("\nIn... Continue Reading
Write a c program to illustrate the use of storage classes. CSE January 12, 2026 #include <stdio.h> // Global variable (external storage class) int globalVar = 100; // Static global variable (file scope only) stati... Continue Reading
Write a c program to find the GCD of two numbers using iteration and recursion CSE January 12, 2026 #include <stdio.h> // GCD using iteration (Euclidean algorithm) int gcdIterative(int a, int b) { while (b != 0) { int tem... Continue Reading
Write a c program to print the reverse of a given number. CSE January 12, 2026 #include <stdio.h> int main() { int num, reversed = 0, remainder; printf("Enter a number: "); scanf("... Continue Reading
generate electricity bill in c program CSE January 03, 2026 #include <stdio.h> #include <string.h> // Required for string operations if you expand customer details int main() { int un... Continue Reading
distance travelled by an object in c program CSE January 03, 2026 #include <stdio.h> int main() { // Declare variables for speed, time, and distance float speed, time, distance; // Prompt... Continue Reading
Area of a triangle using Heron’s formula in C CSE January 02, 2026 #include <stdio.h> #include <math.h> int main() { double side1, side2, side3, s, area; // Input the lengths of the side... Continue Reading
Finding compound interest in C CSE January 02, 2026 #include <stdio.h> #include <math.h> int main() { double principal, rate, time, amount, compound_interest; // Input pri... Continue Reading
Finding the square root of a given number in C CSE January 02, 2026 #include <stdio.h> #include <math.h> int main() { double number, result; // Input the number printf("Enter a n... Continue Reading
Simple interest calculation in C CSE January 02, 2026 #include <stdio.h> int main() { float principal, rate, time, interest; // Input principal amount printf("Enter princ... Continue Reading
Conversion of Fahrenheit to Celsius and vice versa in C CSE January 02, 2026 #include <stdio.h> int main() { int choice; float fahrenheit, celsius; printf("Temperature Conversion Menu:\n")... Continue Reading
Sum and average of 3 numbers in C CSE January 02, 2026 #include <stdio.h> int main() { float num1, num2, num3, sum, average; // Input three numbers printf("Enter three num... Continue Reading
Write a c program that prints a multiplication table for a given number and the number of rows in the table. CSE October 14, 2025 #include <stdio.h> int main() { int num, rows, i; // Taking input printf("Enter the number: "); scanf(... Continue Reading
Write the c program for the simple, compound interest. CSE October 14, 2025 #include <stdio.h> #include <math.h> // for pow() function int main() { float principal, rate, time; float simple_int... Continue Reading
Write a c program for finding the max and min from the three numbers CSE October 14, 2025 #include <stdio.h> int main() { int a, b, c; int max, min; // Taking input printf("Enter three numbers: ");... Continue Reading
Find the given number is a prime or not in C CSE April 18, 2025Find the given number is a prime or not in C Program: #include <stdio.h> int main() { int num, i, isPrime = 1; // isPrime is a fla... Continue Reading
Find the factorial of given number using any loop in C CSE April 18, 2025 Find the factorial of given number using any loop in C Program: #include <stdio.h> int main() { int num, i; unsigned long lon... Continue Reading