You are on page 1of 2

Winter Vacation Assignment

1. Write a program to check a year for leap.

2. Write a program to calculate the simple interest.


a. If balance is greater than 99999, interest is 7%
b. If balance is greater than or equal to 50000 and less than 100000 is 5%
c. If balance is less than 50000, interest is 3%

3. Write a program to read a sentence and counts the total number of character (excluding
space) using while loop.

4. Write a program to generate Fibonacci series using function (with argument and return
value).

5. Write a program to read number and identifies whether the given number is a prime
number or not using function (with argument and return value).

6. Write a program to calculate the factorial of a given number using function (with
argument and return value).

7. Write a program to identify whether the given number is Armstrong number or not using
function.
8. Write a program to identify whether the given number is Palindrome number or not using
function.

9. Write a program to identify whether the given number is Dudeney number or not using
function
10. Write a program to identify whether the given number is Strong number or not using
function. (145 is a strong number because 145=(!1)+(!4)+(!5)=1+24+120=145 )

11. Write a recursive program to generate Fibonacci series up to n terms.

12. Write a program to display following pattern.


1
2 3
3 4 5
4 5 6 7
5 6 7 8 9
13. Write a program to display following pattern.
1
1 1
1 1 1
1 1 1 1
1 1 1 1 1

14. Write a program to display following pattern.


5 4 3 2 1
4 3 2 1
3 2 1
2 1
1

15. Write a loop that will generate every fourth integer, beginning with variable i=3 and
containing for all integer that are less than 150. Calculate the sum of those integers that
are divisible by 7.

16. Write a program to read integers n1 and n2 and display all odd numbers between those
two numbers.

17. What is meant by branching? Suppose a 'break statement' is included within the
innermost of several nested control statements. What happens when the 'break statement'
is executed?

18. What is the purpose of the keyword void? Where is this keyword used? Why might a
return statement be included in a function that does not return any value?

19. What are the keywords in C? What restrictions apply to their use? Compare the use of the
switch statement with the use of nested if-else statements. What is function? Are
functions required when writing a C program? State three advantages of the use of
functions. Can the names of formal arguments within a function coincide with the names
of other variables defined outside of the function? Explain.

20. Define control statement. Compare while and for loop with suitable examples. Write a
program to print all numbers between 10 and 100 which are divisible by 7.

21. What is type casting? Explain it with suitable examples.

22. What is constant? Explain the constants in C with example.

You might also like