You are on page 1of 3

Assignment-2

1. Write a C program to perform


arithmetic calculation such as
addition(function name - add),
subtraction(function name - sub),
multiplication(function name - mul) and
division(function name - div) using
function.

2. Write a C program to find the factorial


of a given number. Test your program
with input 5 and 12.

3. Write a C program to find the factorial


of a given number . Use a function
called factorial to compute the factorial of
a given number. Test your
program with input 5 and 12.
4. Write a C program to find the factorial
of a given number using a recursive
function called factorial. Test your
program with input 5 and 12.

5. Write a C program to exchange two


given values using call_by_value.

6. Write a C program to exchange two


given values using call_by_reference.

7. Write a C Program to declare an


integer variable , make a pointer point to
it
and print the value of the variable using
pointer.

8. Write a C Program to declare a floating


point variable , make a pointer point
to it and print the value of the variable
using pointer.
9. Write a C Program to declare a
character variable , make a pointer point
to it
and print the value of the variable using
pointer.

10. Write a C program to read a string


and count the number of vowels,
consonants, digits , white spaces and
special characters.

11.Write a C program to find the


Maximum Element from a given set of
data
stored in an Array.

12.Write a C program to find the


Minimum Element from a given set of
data
stored in an Array.

You might also like