Sei sulla pagina 1di 2

1. C program to find sum of all natural numbers.

Series: 1+2+3+4+..N

2. C program to find sum of the square of all natural numbers from 1 to N.


Series: 1^2+2^2+3^2+4^2+..N^2

3. C program to find the sum of Natural Number/Factorial of Number of all natural numbers from 1 to N.
Series: 1/1! + 2/2! + 3/3! + 4/4! + ... N/N!

4. C program to find sum of following series:


1+ 1/2 + 1/3 + 1/4 + 1/5 + .. 1/N

5. C program to find sum of following series:


1 + 3^2/3^3 + 5^2/5^3 + 7^2/7^3 + ... till N terms

6. c program to find THE SUM OF SERIES 1 + 1/2 + 1/3 + 1/4 + … + 1/N

7. c program to find out the sum of series 1^3 + 2^3 + …. + n^3

8. 6) (1!/1) + (2!/2) + (3!/3) + (4!/4) + (5!/5) + ... + (n!/n)

9. 7) [(1^1)/1] + [(2^2)/2] + [(3^3)/3] + [(4^4)/4] + [(5^5)/5] + ... + [(n^n)/n]

10. 8) [(1^1)/1!] + [(2^2)/2!] + [(3^3)/3!] + [(4^4)/4!] + [(5^5)/5!] + ... + [(n^n)/n!]

11. 9) 1/2 - 2/3 + 3/4 - 4/5 + 5/6 - ...... n

12. Find Sum of Series [ 1-X^2/2!+X^4/4!- .........]

13. WAP to interchange the largest and the smallest number in an array.

14. WAP to find the second largest number from an array.

15. WAP to find the second smallest number from an array.


16. WAP to enter n number of digits. Form a number using the digits.
17. WAP to read marks of 10 students in the range of 0-100. Then make 10 groups:0-10, 11-20, … ,91-100.
Count the number of values that falls in each group and display the result.
18. WAP to swap kth and (k+1)th elements in an integer array where k is given by the user.
19. WAP to rearrange an array in reverse order using second array.
20. WAP to rearrange an array in reverse order without using second array.
21. Arrange the numbers stored in an array in such a way that the array will have the odd numbers followed by
even numbers.
22. Find the frequency of digits in a set of numbers.
23. WAP to find whether an array of integers contain duplicate numbers.
24. WAP to find whether an array of integers contain duplicate numbers and compute the number of times they
occur.
25. WAP to print Fibonacci series using array.
26. C program to delete prime numbers from an array.

27. C program to check prime numbers in an array.

28. C program to calculate Sum, Product of all elements.

29. C program to replace all EVEN elements by 0 and Odd by 1 in One Dimensional Array.

30. C program to Add and Subtract of Two One Dimensional Array elements.
31. C program to sort an one dimensional array in descending order.

32. C program to find the first repeated element in an array.

33. Consider a scenario where there are two classes A and B having 30 students each. A test was conducted for
both the classes in a single room and student having same class roll number but from different classes was
made to sit together and as a result they copied from each other and scored equal marks. Wap in ‘C’ to
compute the marks of class B students based on the marks of class A students (using Arrays).

34. Write a program in ‘C’ to store (in an array) and print the roll numbers of students beginning from m to n.

35. Write a program in ‘C’ to calculate standard deviation.

36. A program P reads in 500 integers in the range [0..100] representing the scores of 500 students. It then
prints the frequency of each score above 50. What would be the best way for P to store the frequencies?
Write the above program in ‘C’.

37. In USA President election, there are 50 states, you have to create two arrays HILLARY and TRUMP store
the number of vote polled in each state. Write a program to show result in each state and who is winner?
38. Students are standing in sequence of their roll number. Write a program to print the roll numbers of
alternate students.
39. There is a class of 10 students having roll numbers from 1 to 10. One of the students in class is missing.
How will you find the roll no. of that missing student?
40. Find the binary equivalent of an integer number using array.
41. An array stores the roll number of all present students. Write a program to search a student in a class by
using their roll no. If roll number is found in this array, then find the position.
42. Write a C program to delete an element from the array. It should cover the following cases:
a. The index of deleted element is provided
b. The deleted element is provided by user.
c. If index or deleted element is not found in the array, then print the message “Deleted Element not
found” .
43. Write a C program to insert an element at the nth position by checking that array index condition.
44. Write a program to sort the elements of an array in ascending order using Bubble Sort.
45. An array contains n numbers ranging from 0 to n-2. There is exactly one number is repeated in the array.
You need to write a program to find that duplicate number. For example, if an array with length 6 contains
numbers {0, 3, 1, 2, 3}, then duplicated number is 3.

Potrebbero piacerti anche