C Program to Calculate Electricity Bill

The electricity bill is calculated by multiplying the unit generated by the cost per unit. ie, if the unit generated is 190(say) and the cost per unit is 10Rs so the total electricity bill is 190×10 = 1900Rs. Although the electric meters installed at our houses read the electricity consumed in kilowatt-hours(kwh) and 1 kwh … Read more

advertisement

Fizzbuzz Program in C

FizzBuzz Program in C is a simple programming task used in software developer job interviews. It is often used as an initial screening question to help filter out candidates who lack basic coding skills. In this task, you are asked to write a program that prints the numbers from 1 to 100. But for multiples … Read more

advertisement

Pyramid Patterns in C

What is a Pyramid Pattern? A pyramid pattern in a two-dimensional plane is equal to an equilateral triangle. There are many variations of these pyramid patterns such as half pyramid, inverted pyramid, and diamond shape. Let us see how we can draw all these shapes using C language and understand the process. Problem Description Write … Read more

advertisement

SJF Scheduling Program in C

Problem Description: Write an SJF scheduling program in C to determine the average waiting time and average turnaround time given n processes and their burst times. SJF Scheduling Algorithm in C: The CPU scheduling algorithm Shortest Job First (SJF), allocates the CPU to the processes according to the process with smallest execution time. SJF uses … Read more

advertisement

Round Robin Scheduling Program in C

Problem Description: Write a C Program that implements the Round Robin Scheduling algorithm and determines the average waiting time and turnaround time. What is Round Robin Scheduling in C? Round Robin Scheduling is a CPU scheduling algorithm in which each process is executed for a fixed time slot. Since the resources are snatched after the … Read more

advertisement

FCFS Scheduling Program in C

Problem Description: Write an FCFS Scheduling Program in C to determine the average waiting time and average turnaround time given n processes and their burst times. FCFS Scheduling Algorithm: The CPU scheduling algorithm First Come, First Served (FCFS), also known as First In, First Out (FIFO), allocates the CPU to the processes in the order … Read more

advertisement

Strong Number Program in C

Strong Number Program in C: A strong number is a number that is the sum of the factorial of its digits. Examples: Assume the number is 145, which equals 1! + 4! + 5! = 1 + 24 + 120 = 145. 145 is a strong number since the sum of its factorials equals the … Read more

advertisement

C Program to Subtract Two Matrices

Matrix Subtraction in C is used to subtract two matrices. i.e. calculate and print the difference of them. Example: Given two matrices of same size, this program will subtract the corresponding elements of each matrix and print the result. Input: First Matrix: Second Matrix: Output: – = = Problem Description Write a C program which … Read more

advertisement

C Program to Find Quotient and Remainder

Problem Description Write a C program to find quotient and remainder of two numbers. Quotient: The result of dividing one integer by another is the quotient. For example, if we divide 9 by 3, the result is 3, which is the quotient. Remainder: The value remaining after division is called the remainder. If one number … Read more

advertisement

C Program to Add Two Numbers

Addition of Two Integers in C: Addition in math is a process of combining two or more numbers. The result of the final answer we get after the process is called the sum. Examples: Input: A = 4, B = 3 Output: A + B = 4 + 3 = 7 Input: A = 12, … Read more

advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.