Snake Game in C

Snake Game was quite a popular game in the late 90s. It was developed and published by Gremlin in the year 1976. Since then, different versions of the snake game have become popular on different platforms due to their easy, engaging, and interactive user experience and implementation. One such platform which made snake game a … Read more

advertisement

C Program to Calculate EMI

Problem Description Write a C Program to Calculate EMI using formula. What is EMI? Equated Monthly Installments (EMIs) are monthly payments made by borrowers to creditors on a specific date. Over some years, the loan is repaid in full, with EMIs covering both interest and principal. How to Calculate EMI with Example? EMI calculator is … Read more

advertisement

Hello World Program in C

Hello World Program in C: Printing “Hello World” is the first step we follow in learning any programming language. It introduces us to various terminologies associated with a programming language. Problem Description Write a C program to print “Hello World”. Problem Solution 1. Include the necessary header files for printing. 2. Declare the main function … Read more

advertisement

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

C Program to Convert Time from 12 Hour to 24 Hour Format

This is a C Program to convert 12-hour AM-PM time format to 24-hour Military time format. Problem Description Given a time in 12-hour AM/PM format, convert it to military (24-hour) time. User has to take input as a string containing a time in 12-hour clock format (i.e.: hh:mm:ssAM or hh:mm:ssPM), where 01 ≤ hh ≤12 … Read more

advertisement

C Program that Takes Input as 2323 and Gives Output as 2332

This is a C program to find a greater number of entered number using same digits. Problem Description This program takes a number as input and finds a greater number of the entered number using same digits. Problem Solution 1. Take a number as input. 2. Reverse the number and store it in the array. … Read more

advertisement

C Program to Print the Program Name and All its Arguments

This is a C Program to print the program name and all its arguments. Problem Description This C Program Prints the Program Name and All its Arguments. Problem Solution It prints the program name and its Arguments using command line argument as shown in the program below. Program/Source Code Here is source code of the … Read more

advertisement

C Program to Count No of Lines, Blank Lines, and Comments in the Program

This is a C Program to Count No of Lines, Blank Lines, Comments in a given Program. Problem Description This C Program counts the no of lines, blank lines, comments in a given program. Problem Solution 1. First count the number of lines in a file. 2. Count the number of blank lines. 3. Use … Read more

advertisement

C Program to Input 3 Arguments and Operate Appropriately on the Numbers

This is a C Program to input 3 arguments and operate appropriately on the numbers. Problem Description This program take 3 arguments as input and operate appropriately on the numbers. Problem Solution 1. Take two numbers and a operator as 3 arguments. 2. Use switch statement to test the operator. 3. According to the operator, … 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.