0% found this document useful (0 votes)
14 views1 page

C Programming Concepts and Functions

The document contains a series of programming questions focused on modular programming, functions, recursion, and data structures in C. It includes tasks such as writing functions for various operations, explaining concepts like pass-by-value and recursion, and comparing structures and unions. Additionally, it addresses the implications of variable types and global variables in debugging.

Uploaded by

sshazam737
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views1 page

C Programming Concepts and Functions

The document contains a series of programming questions focused on modular programming, functions, recursion, and data structures in C. It includes tasks such as writing functions for various operations, explaining concepts like pass-by-value and recursion, and comparing structures and unions. Additionally, it addresses the implications of variable types and global variables in debugging.

Uploaded by

sshazam737
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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.

You might also like