MODULE 3 PREVIOUS YEAR QUESTION
1. What is meant by modular programming, and what rules must be followed
while using this approach?
2. In what ways do functions allow a large program to be divided into smaller,
manageable modules? Provide suitable examples.
3. How are formal parameters different from actual parameters? Explain with an
example.
4. Describe how pass-by-value works in C, along with a brief example.
5. Write a C function that computes the sum of two integers and returns the
result.
6. Write a C function that takes an integer array and its size as parameters and
prints all elements.
7. Write a C function that calculates the sum of elements in an integer array and
display the result in main().
8. Create a recursive function to find the factorial of a number and explain how
recursion works.
9. Write a function that takes a string and counts the number of vowels; call it in
main().
10. Write a function to calculate and return the average marks of five students and
explain how array passing works.
11. Write a recursive function to print the Fibonacci series up to n terms and
explain the role of recursion.
12. Explain the concept of recursion with an example and describe how the
recursive calls execute.
13. Compare structure and union based on memory allocation.
14. Write a program to display student details using a structure passed to a
function; explain how structures are passed.
15. Compare structures and unions and write a program demonstrating memory
allocation differences.
16. Compare automatic, static, and global variables with a program showing
differences in their behavior.
17. What happens when a variable is declared static inside a function? Provide an
example.
18. Why do global variables make debugging difficult? Justify your answer.
19. Write a program using a static variable to count how many times a function is
called.