Make your own free website on Tripod.com
   

Home   |  Viewing problem solution  |  About me


 

MAISM

 
Maharishi Arvind Institute of Science and Management
MCA Batch 2002-2003
[I Semester]

C programming language assignments (You can also download All Source Files and All Binary Files.)

#

Assignment Objective Source Binary
1. Write a program to convert a given temperature in Celsius to Fahrenheit and display both. temperat.c temperat.exe
2. Write a program to find out largest amongst three numbers and display the numbers. largest.c largest.exe
3. Write a program to calculate the average of N numbers and display the numbers and average. average.c average.exe
4. Write a program to calculate the roots of a quadratic equation for all the cases. quadrati.c quadrati.exe
5. Write a program to calculate a salesman's salary for given-base salary, bonus-rate, commission-rate, quantity and unit-price. Follow the following rules.

Bonus = bonus-rate * quantity
Commission = commission-rate * quantity * unit-price
Gross-Salary = base-salary + Commission
salesman.c salesman.exe
6. An electric power distribution company charges its domestic consumers as follows:

Consumption Units       Rate of Charge
0-200                          Rs. 0.50 per unit
201-400                      Rs. 100 + Rs. 0.65 per unit on access of 200
401-600                      Rs. 270 + Rs. 0.80 per unit on access of 400
601 and above             Rs. 390 + Rs. 1.00 per unit on access of 600

Write a program to read customer number and units consumed and display the amount to be paid by the customer.
electric.c electric.exe
7. Write a program to determine whether a given number is odd or even and display the appropriate message. evenodd.c evenodd.exe
8. Write a program to print the following outputs using for loops

a) 1                                   b)                 1
    2  3                                                2     2
    4  5  6                                         3     3     3
    7  8  9  10                                4     4     4     4
                                               5     5     5     5     5
a) series.c

b)
pyramid.c
a) series.exe

b)
pyramid.exe
9. Write a program to determine binomial coefficient recursively. poly.c poly.exe
10. Write a program to check that a given number is palindrome or not. palin.c palin.exe
11. Write a program to determine whether a number is prime or not. A prime number is one which is divisible only by 1 or itself. prime.c prime.exe
12. A 5 digit positive integer is entered through the keyboard. Write a function to calculate sum of digits of the 5 digit number

a) Without using recursion.
b) Using recursion.
a) soda.c

b)
sodb.c
a) soda.exe

b)
sodb.exe
13. Write a program to find out the sum of the series,
1 + X2 + X2/2! + ............ 10 terms.
sos.c sos.exe
14. Write a program to accept 10 elements of an array and find highest of the number and average of these elements. arrha.c arrha.exe
15. Write a program to read a square matrix and transpose it. transpos.c transpos.exe
16. Write a program to accept 10 numbers and arrange them in ascending order using

a) Selection Sort.
b) Bubble Sort.
a) selsort.c

b)
bblsort.c
a) selsort.exe

b)
bblsort.exe
17. Write a program to read 10 names & their telephone numbers and search a given telephone number. If it is available in the list, display its corresponding name. nametel.c nametel.exe
18. Write a program to read two matrices of same order and find out a third matrix which is the sum of these two matrices. matsum.c matsum.exe
19. Write a program to read two one dimensional arrays A and B of integers which are sorted in ascending order and merge them into a single dimensional third array containing every element from array A and B in ascending order. merge.c merge.exe
20. Write a program to read two matrices A (mxn) and B (mxn) and multiply them to obtain a third matrix C (mxn). matmul.c matmul.exe
21. Write a program to accept a list of names and sort them in alphabetical order. sortname.c sortname.exe
22. Write a program which reads a line of text and count the number of characters, words and lines in the text. allcount.c allcount.exe
23. Write a program which will read a line of text and will count all occurrences of a particular (second) word. cntoccr.c cntoccr.exe
24. Write a program to read a string of text and count the number of vowels in it. vowels.c vowels.exe
25. Write a program to accept an integer number and calculate factorial of the number using function sub-program. fact.c fact.c
26. The Fibonacci numbers are defined recursively as follows:

F(0) = 1, F(1) = 1, F(n) = F(n-1) + F(n-2), where N > 1.

Write a function that will generate first N terms of the Fibonacci series.
fibonacc.c fibonacc.exe
27. Write a program which will read principal, rate of interest and period (in years) through main program and calculate compound interest and amount using function sub-program. cmpdint.c cmpdint.exe
28. Write a program that uses a function to sort an array of integers. sortarr.c sortarr.exe
29. Write a program to accept five employees' records containing name (20 chars), age, salary using structure and then copy it to another structure. Display the same. employee.c employee.exe
30. Write a program that read a roll_number, name, marks of three subjects of 10 students using structure and calculate the subject-wise-total and student-wise-total and store them as a part of the structure. students.c students.exe
31. Write a program which copy one string to another string using pointer function. cpstr.c cpstr.exe
32. Write a program using pointers, to compute the sum of all elements stored in an array. cmptsum.c cmptsum.exe
33. Write a program using pointers to determine the length of a character string. lenstr.c lenstr.exe
34. Write a function that receives a sorted array of integers and an integer variable. This variable should now be inserted in the array at its correct position. insele.c insele.exe


All rights reserved. Copyright © 1999 - . Krishna Kumar Khatri.
Best viewed with Microsoft IE 6 or later, under 800x600 resolution with True Color (24-bit).