C Programming Questions
C Programming Questions
C Programming Questions
B)
* * * * * * * * * *
* * * * * * * *
* * * * * *
* * * *
* *
c)
* * * * *
* * * *
* * *
* *
*
*
* *
* * *
* * * *
* * * * *
D)
* * * * * * * * * *
* * * * * * * *
* * * * * *
* * * *
* *
* * * *
* * * * * *
* * * * * * * *
* * * * * * * * * *
E)
F)
G)
H)
11111
10001
10001
10001
11111
I)
55555
44445
33345
22345
12345
11.) Input an array of 10 elements. Find the sum of elements in even indices and odd
indices.
12.) Input a 2d square array. Find the sum and product of the main diagonal elements.
13.) For a given principle, rate of interest and number of years.
Find: a) Simple interest
b) Compound interest
14.) find the nearest cube root for a given number.
15.) find the nearest square root for a given number.
16.) Calculate Area and Volume of a Cone
17.) Program to Calculate nPr
18.) Calculate the Value of nCr
19.) Volume and Surface Area of a Sphere
20.) Input an array of characters and sort them alphabetically
21.) Input a 2d matrix and find its:
a) Sum of all elements
b) Sum of even row elements
c) Transpose of matrix
d) Determinant of matrix
e) Find inverse if it exists
22) Input two 1-d arrays and find their: a) union b)intersection
25) Find sum of all non-prime numbers from 1 to 100 (Use ‘continue’ statement)
Strong number is a number whose sum of all digits’ factorial is equal to the number ‘n’. So,
to find a number whether its strong number, we have to pick every digit of the number like
the number is 145 then we have to pick 1, 4 and 5 now we will find factorial of each number
i.e, 1! = 1, 4! = 24, 5! = 120.
Now we will sum up 1 + 24 + 120 so we get 145, that is exactly same as the input given, So
we can say that the number 145 is strong number.
28) Input a 1-d array and find the mean, median and mode
29) Input a array of distinct elements and Cyclically Permute the Elements of an
Array
30) C Program to Find the Odd Element given an Array with only two Different
Elements. Input the 2 allowed elements from user.