About Me

My photo
Vijayapur, Karnataka, India
I am interested in Teaching.

Thursday 13 December 2018

Assignment 3: C Programming for Problem Solving (CPS) I Sem G Div.

Questions on Functions

1. What is function? write its advantages and give examples.

2.Discuss the elements of user defined functions with example.

3. Discuss the categories of functions.

4. What are actual and formal parameters? Give examples.

5. What are parameter passing mechanism? Discuss the types. (call by value and call by reference)
    with examples. 

6. What is recursive example? Write recursive function to find factorial of N.

7. Discuss storage classes used in C with examples. (auto,global,static,register)




Write functions for following.


1. Function to find square of a number.

2. Function to find factorial of 'n'.

4. Write function named isprime(n) that return 1 if number is prime; otherwise, 0

5. Function to find length of a string.

6. Function to find largest of two numbers.

7. Function to find largest of N numbers.

8. To sort N numbers is ascending order.




No comments:

GCD of two numbers and its application...

The greatest common divisor (gcd) of two numbers is the largest positive integer that divides both numbers without leaving a remainder. The ...