Tuesday, February 26, 2013

List of C Programs for FE SEM II (SPA)

List of C Programs for FE SEM II (SPA)
1. Write a program to calculate the simple interest taking principal, rate of interest and number of years as inputs from user.
2. Write a program to accept basic salary from the keyboard. Calculate the gross salary that includes basic salary, 50% DA and 40% HRA.
3. Write a program to accept the length and breadth of a rectangle from the user. Calculate and display the area and perimeter.
4. Write the program to accept one it type data and one float type data. Multiply the two numbers and display the result.
5. Write a program to accept three numbers from user and display the greatest of three using the conditional operator.
6. Write a program to accept three numbers and find their average.
7. Write a program to swap two integers.
8. Write a program to accept a two digit number and display it in reversed form.
9. Write a program to check if the entered number is even or odd.
10. Write a program to display the first n natural numbers, where the value of n is taken from user.
11. Write a program to find the factorial of a number.
12. Write a program to display the multiplication table of a user entered number. The table must be upto 10.
13. Write a program to calculate the value of the following series.
14. Write a program to calculate the sine of an angle using the following series for x as the angle in radians.
15. Write a program to display the following for the users specified number of lines.
*
**
***
****
*****
|
n lines
16. Write a program to display the following for the user specified number of lines.
*
**
***
****
*****
******
*******
********
|
n lines
17. Write a program to display the following asking the user for the number of lines
1
12
123
1234
12345
123456
18. Write a program to display the following asking the user for the number of lines.
A
ABA
ABCBA
ABCDCBA
ABCDEDCBA
ABCDEFEDCBA
19. Write a program to calculate the value of n-1)!.
20. Write a program to display first 10 numbers divisible by 5 and 8.
21. Write a program to chck if the entered number is prime number or not.
22. Write a program to check if the entered number is Armstrong or not.
23. Write a program to check if the year entered is leap year or not.
24. Write a program to display the factors of a user entered number.
25. Write a program to display the user entered number in words.
26. Write a menu driven program to perform add / subtract / multiply / divide / modulus based on the users choice.
27. Write a program to display the month name by accepting the month number form user.
28. Write a program to demonstrate the use of break statement
Or
Write a program to accept 10, 2-digit numbers from user and add them. If the user enters a three digit number stop accepting the numbers and display the sum.
29. Write a program to demonstrate the user of continue statement
Or
Write a program to accept 5, 2-digit numbers from user and add them. If the user enters a three digit number, this number should be discarded and again accepted. Also an indication must be given to the user that he has entered a number greater than k99 and hence it is not accepted. The sum must be displayed at the end.
30. Write a program to find GCD and LCM of two numbers.
31. Write a program to add two numbers using function.
32. Write a program to find the factorial of a number using a function.
33. Write a program to find n Fibonacci elements, using a recursive function.
34. Write a program to find value of y using recursive function, where y=xn.
35. Write a program to accept ‘n’ integers from user into an array and display them one in each line.
36. Write a program to accept ‘n’ integers from user into an array and display the average of these numbers.
37. Write a program to accept ‘n’ integers from user into an array and display the count of even and odd numbers of these.
38. Write a program to find an element in an array and display the index of the element using a function. OR Write a program to implement sequential search algorithm.
39. Write a program to sort numbers in ascending order. R Write a program to implement bubble sorting algorithm for sorting numbers in ascending order.
40. Write a program to accept an m x n matrix and display it in natural form.
41. Write a program to add two matrices of size m x n.
42. Write a program to accept a string, copy it into another string and display this new string.
43. Write a program to accept two strings, join them and display the result.
44. Write a program to accept a string and find its length without using the string header file.
45. Write a program to reverse a user entered string.
46. Write a program to check whether the entered string is palindrome or not (Do not use the string header file).
47. Write a program to find the sum of column elements of a 2 dimensional MxN array A.
48. Write a program to count blank spaces, digits, vowels and consonants in the string.
49. Write a program to demonstrate the access of global variable.
50. Write the program to add two numbers using function. Pass the pointers to the variables as reference to the functions.
51. Write a program to swap two numbers using a function. Pass the values to be swapped to this function using call-by-value method.
52. Write a program to swap two numbers using a function. Pss the values to be swapped to this function using call-by-reference method.
53. Write a program to store and display the name, roll number and fees of a student using structure.
54. Define structure within structure consisting of following elements:
i. Employee Code
ii. Employee Name
iii. Employee Salary and
iv. Employee Date_of_joining
Write a C program to read at least 10 records and display them.
55. Write a program to accept a set of 10 numbers and print the numbers using pointers.
56. Write a program to accept a set of 10 numbers and print the numbers using pointers. Find average of these integers.
57. Write a program to accept a set of characters from user until the user presses the full stop(‘ . ‘) and store it in a text file. Read from the file and display the contents of the file.
58. Write a program to accept the name and roll number of a student and store it in a text file. Read the stored data and display the same from the file.
59. Write a program to copy the contents from one text file to another.
60. Write a program to count the number of characters in a text file.

2 comments:

  1. are this questions are important or may come in exama

    ReplyDelete
  2. Awesome and interesting article. Great things you've always shared with us. Thanks. Just continue composing this kind of post. c program to find lcm of n numbers

    ReplyDelete

Lecture PPTs of MIS , Module 4 to Module 6

 Module 4 Social Computing (SC): Web 3.0 , SC in business-shopping, Marketing, Operational and Analytic CRM, E-business and E-commerce B2B B...