Académique Documents
Professionnel Documents
Culture Documents
2.
3.
4.
5.
6.
7.
n ( x 1x 2x 3 x n )
2.
n
1
1
1
+
++
x1 x2
xn
3.
1 1 1 1 1
1
1
+ + + + +
+
0! 1! 2 ! 3 ! 4 !
n
!
( n1 ) !
48.Draw a flowchart to read 10 positive integers and print how many are
multiples of 7
49.What is the difference between variable declaration, definition and
initialization, give an example each
50.Write a C program to read a list of integers from the keyboard and print the
sum and average of the integers
51.Write a C program to read a list of integers from the keyboard and print the
largest and smallest integer among the list
52.Write a C program to print the following formats using for loops
1
1
1
1
1
1
1
1
1
1
2
23
234
2345
1
2
3
4
5
1
11
111
1111
*
*
*
*
*
2
33
444
5555
1
1
1
1
1
*
**
***
****
2345
234
23
2
15
15
15
37
77.The sum of cubes of individual digits of the given number is called Armstrong
Number. Write a C program to check whether the given number is Armstrong
Number or not. (Example: 153=13+53+33 is an Armstrong number)
78.Write a C program to calculate sum of n natural numbers using a goto
statement.
79.Write a C program to read a positive integer X and check whether it has value
in between 5 and 15. If 5<X<15 then increment X by 1, shift the bits of X by
2 to the left, otherwise decrement the X by 1, shift the bits of X by 3 bits to
the right.
80.Write a C program to read a positive integer in the range of 101 to 999 and
print the digit in units place, digit in ten place, digit in hundreds place.
Ex:- input is 437, print as digit in hundreds place is 4, digit in tens place is 3 ,
digit in ones place is 7.
81.Write a C program to add two complex numbers, consider real part of two
complex numbers as two variables, similarly imaginary part of complex
numbers as two variables, print the result as a complex number
82.What is type conversion? Explain external and internal type casting with an
example each
83.Write an algorithm to read 10 positive integers and find out how many are
perfect squares (such as 49 81). You may assume that input values are in the
range of 1- 1000
84.Write a C program to print the last digit of a given number?
85.Write a C program to read two integers X,Y and print -1 if X<Y , 0 if X==Y
otherwise 1.
86.Write a C program that reads the values of unit price, quantity, discount
percentage on unit price and some tax of 2%. Find the final bill and print it.
87.Write a C program to read two positive integers X,Y and find X/Y. print true if
result of the division is greater than 3 otherwise false (Note: Y value should
not be ZERO)
88.Write a C program to read the N numbers from the user and find the average
of the N numbers, print the numbers whose value is greater than the average
calculated
89.Write a C program to obtain the transpose of a 3 X 3 matrix .
90.Write a C program to print the multiplication table of a given number
91.Write a C program to print the minimum and maximum of an array?
92.Write a C program to check whether a given number is a palindrome or not?
93.Write a C program to read a String and find the length of string without using
string handling functions
94.Write a C program to do the following
1) Read two integers
2) Read two characters
3) Increment 1st integer by 1 and decrement 2nd integer by 1
4) Add the 1st integer to 1st character
5) Subtract the 2nd integer from 2nd character
6) Print the two characters along with their ASCII value