About Me

My photo
Vijayapur, Karnataka, India
Let us learn together!

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:

AI Prompts to get source code for IDT projects

AI Prompt-1 Design and develop web application that read student roll number, name, USN and Department and store in Browsers memory. Next co...