C Solved programs, problems with solutions
C Solved programs —-> C is a powerful general-purpose programming language. It is fast, portable and available in all platforms. If you are new to programming, C is a good choice to start your programming journey.
This page contains the C solved programs/examples with solutions, here we are providing most important programs on each topic. These C examples cover a wide range of programming areas in Computer Science.
Every example program includes the description of the program, C code as well as output of the program. All examples are compiled and tested on a Windows system.
These examples can be as simple and basic as “Hello World” program to extremely tough and advanced C programs. Here is the List of C solved programs/examples with solutions (category wise) and detailed explanation.
C Solved Programs by categories…….
If you found any error or any queries related to the above programs or any questions or reviews , you wanna to ask from us ,you may Contact Us through our contact Page or you can also comment below in the comment section.We will try our best to reach up to you in short interval.
Thanks for reading the post….
(using file handling)
Enter Country Name (Inida): india
5 states()
Enter Name of State : Rajasthan
Enter Name of capital : jaipur
show the menu of jaipur city:
1. check college in city :
2. check school Name:
Enter choice : 1
show list of all college in jaipur city(10):
college Name address contact no
Enter choice : 2
show list of all school in jaipur city(10):
school Name address contact no
Write a program that reads a list of integers until a stopping condition is met and then print each test score together
with Pass, if the score is greater than or equal to 60, and Fail otherwise.
bro worst
worst website
Write a C program to find the sum of contiguous sub array within an array which has the smallest
sum. Also print where in the array the smallest sum occurred.
For example, given the array [4, -1, 2, -3, 1, -2, 7, -5, 4], the contiguous sub-array [1, -3, -2] has the
smallest sum of -4 and it occurred in [0:6].
To understand contiguous sub array, given the array [1, 2, 3] the contiguous sub arrays are [1], [2],
[3], [1, 2], [2, 3], [1, 2, 3], but [1, 3] is not a contiguous sub array.
Sample Input
Sample Output
Consider an Auto spares store which has different categories of items like. Under each category, the shop holds a maximum capacity of 1000 items. The arrangement of items in the racks vary from time to time. Based on the item type and availability, the supplier also varies. Each supplier can supply different items. The system in the shopping mall has the complete description of list of all items which includes item number, name, category, supplier name, price, total quantity and qty available. Based on the items purchased by the customer, billing is done. From the above description, initially the owner… Read more »
#include<stdio.h>
int main()
{
int i;
float avg=0, sum=0 ,a[10];
printf(“Enter 10 numbers”);
for (i=0; i<=9; i++)
scanf(“%d“, &a[i]);
for (i=0; i<=9; i++);
{
sum=sum+a[i];
avg= sum/10.0;
}
printf(“average is %f“, avg);
return 0;
}
the output averge is 0.00000
please help i’m beginer in c programming
using visual studio code
Try with this code ..
#include<stdio.h>
int main()
{
int a[20],i ,n ;
float avg=0 , sum=0 ;
printf(“Enter no of elements in array :\n “);
scanf(“%d”, &n);
printf(“\n Enter the array of element : \n”);
for (i=1; i<=n; i++)
{
scanf(“%d”,&a[i]);
}
for (i=1; i<=n; i++)
{
sum=sum+a[i];
avg= sum/n;
}
printf(“\n sum of elements :%f”,sum);
printf(“\n average is %f”, avg);
return 0;
}
#include <stdio.h>
int main(){
/*Short and Sweet Code, Working code Please check inverted commas while running this code.*/
int value[10];
float Sum, Average;
for(int i=0; i<=9; i++){
printf(“Enter %d number: \n”, i+1);
scanf(“%d”, &value[i]);
}
for(int i=0; i<=9; i++){
Sum += value[i];
}
Average = Sum/10;
printf(“Average of these 10 numbers is %f”, Average);
return 0;
}
#include<stdio.h>
int main()
{
/*You have made 2 mistakes in this program.*/
int i;
float avg=0, sum=0 ,a[10];
printf(“Enter 10 numbers”);
for (i=0; i<=9; i++)
scanf(“%d“, &a[i]); /*ERROR 1: %d should be replaced with %f in your program because you declared a[10] as a float so you cannot use %d.*/
for (i=0; i<=9; i++); /*ERROR 2: In this Loop Remove this semicolon after the brackets.*/
{
sum=sum+a[i];
avg= sum/10.0;
}
printf(“average is %f“, avg);
/*After Doing this correction your program will run without giving error OR zero.*/
return 0;
}
Plz Solve this Programe
ভাই পেয়েছেন
Interest is compounded annually at 10% by a certain bank. Make a program that would
input an amount and a number of years (the program should test that both are positive)
and output how much the original amount will be worth after that period.
Thank you
It’s really a wonderful website💥
The Business organization has a problem that they encounter. They received complains about the orders they have that are inaccurate mostly in selection of orders, prices, and quantity of the products. They want to have system update as soon as possible to fix this problem and asking for a refund. Every order must be confirmed to avoid any conflicts of transaction. Also the discounts are not applied when the order are wholesales which is needed to be fix when being total. Certain products are discounted either from a voucher or a wholesale that is minimum of five products. The deduction of… Read more »
send help
To check whether the candidate is eligible for vote or not
(A) Create a C structure, volume with fields: liter and mililiter. Read the value of two volumes and add them, if the value of mililiter is more than 1000 then add it to liter value.
Write a c program for There are 20 workers working in a field. the owner of Field gives them 20 rupees. In that 20 rupees each man get 4 rupees each woman get 50 paise and each child get 25 paise. Then how many are men, women, children in that 20 workers?
A vending machine questions
1. Write a C program to print all odd numbers between 2 values ‘n’ and ‘m’. Read the values ‘n’ and ‘m’ from the user and print all the odd numbers in this range (inclusive range, i.e if ‘n’ or ‘m’ is odd, print those as well).
write a programming using for loop to print all the numbers from them as even m to n there by case classifying them as even or odd