0% found this document useful (0 votes)
98 views

C Program Question Bank

This document contains a list of 85 programming problems for practice in C language. The problems cover a wide range of concepts like data types, operators, control structures, functions, arrays, strings, pointers, structures and file handling. Some example problems include printing data types and sizes, calculating simple and compound interest, swapping values with and without a third variable, finding roots of quadratic equations, generating Fibonacci series, sorting and searching arrays, adding matrices and finding maximum/minimum elements.

Uploaded by

Mayank Joshi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
98 views

C Program Question Bank

This document contains a list of 85 programming problems for practice in C language. The problems cover a wide range of concepts like data types, operators, control structures, functions, arrays, strings, pointers, structures and file handling. Some example problems include printing data types and sizes, calculating simple and compound interest, swapping values with and without a third variable, finding roots of quadratic equations, generating Fibonacci series, sorting and searching arrays, adding matrices and finding maximum/minimum elements.

Uploaded by

Mayank Joshi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

PCS151 List of Programs for practice

1. WAP to print the value and size of different data types (Use size of operator).
2. WAP to find the addition, subtraction, multiplication, division of two numbers
3. WAP to calculate Simple and Compound Interest.
4. WAP to calculate total salary based upon the following:-
HRA = 3 % of Basic salary, TA = 5 % of Basic salary, DA = 3 % of Basic salary
5. Program to convert temperature from Celsius to Fahrenheit
6. Program to enter an ASCII code and display the character associated with it
7. Program to determine the value of a variable num2 depending on num1
8. Write a C Program to swap two numbers (integers) using third variable
9. Program to find the area of a circle and rectangle
10. Write a C Program to swap two numbers (integers) without using third variable
11. WAP to input 3 sides of triangle and calculate area.
12. Program to show similarity between int and char
13. Write a C program code to swap using bitwise XOR
14. Program to show the effect of increment/decrement operator
15. Program to show working of arithmetic operators; also implement implicit and explicit
16. Program to show working of unary Post/Pre Increment/Decrement operator
17. Write a C program which takes no of days as input and convert it into no. of year, month, week, and days
18. Write a C program to find whether a given number is positive, negative, or zero.
19. Write a C program to print greater.
20. Program to find the largest of three numbers
21. Write a C program to find the largest of three numbers.
22. Program to find the largest of three numbers using Logical AND (&&)
23. WAP to find the simple interest if principle amount is less than 10000 else find the compound interest
24. Program to check and print days of week
25. Write a C program to check whether input alphabet is a vowel or not
26. Program to calculate the net salary of a person
27. Write a C program to find roots of a quadratic equation. Find roots only when discriminant is positive.
28. Write a C program to find whether entered character is small case, capital case, a digit or a special symbol.
29. Write a C program to calculate bill for Uttarakhand state electricity board.
30. Write a C program to find grade of the student for four subjects marks for each subject to be entered by the user.
Calculate percentage and based upon the condition print the grade.
31. Write a C program to check whether entered year is leap year or not
32. Write a C program to calculate the bill for a shopkeeper who sales mango @ 5 RS per mango.If bill is greater than
500 then give discount of 10% otherwise no discount.
33. Write a C program to input three side of a triangle and then calculate area.(Applying proper validations)
34. Program to illustrate the working of a simple calculator
35. Write a 'C' program to compute y as a function of x according to the formula
y = 1.2x + 0.98 when x <= 1.0
y = 1.7x + 0.09 when x > 1.0
You must use the switch statement.
36. Write a C program to check whether input alphabet is a vowel or not (Using switch)
37. Write a C program to print first n numbers.
38. Write a C program to find the sum of first n numbers using for loop.
39. Write a C program to print first 100 numbers. Write a C program to find sum and average of first n natural
numbers using while loop.
40. Program to display even numbers between1-20
41. Write a C program to find and print factorial of a number
42. Program to display odd numbers between1 and n (where n is inputted by user)
43. Write a c program to find out NCR factor of given
44. Write a C program to print square of n numbers, where value of n is inputted by the user.
45. Write a C program to find the sum of even and odd numbers between x and y.
46. Write a C program to add digits of a number
47. Write a C program to reverse a number
48. Write a C program to find Armstrong number
49. Write a C program to find Palindrome Numbers
50. Write a C program to print entered number in words.
51. Write a c program to check whether a number is strong or not
52. Write a C program to print n terms of Fibonacci series
53. Write a program to generate the Fibonacci series in c using for loop
54. Write a C program to find sum of n terms of Fibonacci series
55. Write a C program to find the sum of the following series:
1+3+5+7+............ upto n terms
56. Write a C program to find the sum of the following series:
1/1!+2/2!+3/3!+4/4!+............ upto n terms
57. Write a C program to find the sum of the following series:
1/1!+3/2!+5/3!+7/4!+............ upto n terms
58. Write a C program to find the sum of the following series:
12/1!+22/2!+32/3!+42/4!+............ upto n terms
59. Write a C program to find the sum of the following series:
1!+2!+3!+4!+............ upto n terms
60. Write a C program to find the sum of the following series:
1/1!+22/2!+33/3!+44/4!+............ upto n terms
61. Write a C program to find the sum of the following series:
1+1/2+1/3+1/4+.............. upto n terms
62. Write a C program to draw following pattern

63. Write a C program to draw following pattern

64. Write a C program print the following pattern according to number of rows entered (Use
While)
****
***
**
*

65. Write a C program to draw following pattern

66. Draw Fibonacci Pattern

*
*
**
***
*****
********
*************
67. Write a C program to draw following pattern
3
33
333
3333
33333
68. Write a C program to draw following pattern
Note: No nested loop is required.
1, 11, 121 ….are single numbers so it should be printed at once.
1
11
121
1331
14641
69. Write a C program which calculate and print sum and average of elements of an array
70. Write a C program to convert a decimal number to binary number using array(number should be a whole number)
71. Write a C Program to print the elements of array in reverse order
72. Write a C Program to store the elements of array into another array in reverse order
73. Write a C program to print elements of an array greater than average
74. Write a c program to perform sorting on 1-D array
75. Write a c Program to search an element in a 1D array
76. Write a c program to find maximum and minimum element in 1-D array Write a C program to insert an element
at particular position of an array
77. Write a c program to find maximum and minimum element in 1-D array by sorting technique
78. Write a c Program to add two 1d array of unequal sizes
79. Write a C Program to print the upper and lower triangle in a matrix
80. Write a c Program to find addition of two 2d array
81. Write a C Program to read two matrices A & B and perform addition. After Addition perform transpose on final
matrix and print the result in matrix form
82. Write a C Program to find sum of both diagonals elements of a given matrix. Also find row sum & column sum
(Should work on square and non square matrix)
83. WACP to sort array in ascending order and print smallest, second smallest, largest and second largest
element
84. Write a C Program to find the maximum, minimum, second maximum and second minimum element of an
array and print their index
85. Write a C Program to add the elements of both diagonals of a user defined matrix

You might also like