0% found this document useful (0 votes)
11 views2 pages

C Programming Functions & Pointers Guide

The document is a question bank for a programming course focused on C, specifically covering functions and pointers. It includes theoretical questions about function structure, variable scope, argument passing, recursion, function prototypes, and dynamic memory allocation, as well as practical applications for ATM operations, student marks processing, memory usage calculation, salary automation, and patient record management. The questions aim to assess understanding and application of C programming concepts in various scenarios.

Uploaded by

tanishsarmah
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)
11 views2 pages

C Programming Functions & Pointers Guide

The document is a question bank for a programming course focused on C, specifically covering functions and pointers. It includes theoretical questions about function structure, variable scope, argument passing, recursion, function prototypes, and dynamic memory allocation, as well as practical applications for ATM operations, student marks processing, memory usage calculation, salary automation, and patient record management. The questions aim to assess understanding and application of C programming concepts in various scenarios.

Uploaded by

tanishsarmah
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

BANGALORE INSTITUTE OF TECHNOLOGY

K. R. Road, V. Vv. Puram, Bengaluru- 560 004


Autonomous Institute, Affiliated to TU
Recognized by AICTE, New Delhi, India

Subject: Programming in C Subject Code:1BEIT105


Question Bank

Module: 4 (Functions & Pointers)

1. Explain the general form of a function with an example.

2. Explain scope and lifetime of variables with respect to functions.

3. Discuss the different ways of passing arguments to the functions.

4. Explain arguments passed to main() with a suitable example program.

5. Explain the significance of the return statement in C functions.


6. Define a recursive function. Write a C recursive function to calculate factorial of a number
and trace it.

7. Explain the need for function prototypes in C.


8. Discuss the declarations of variable-length parameter lists in functions.

9. Explain inline functions. State their advantages and limitations.

10. Discuss what happens if a function does not return a value even though its return type is
specified.

11. Demonstrate the use of function pointers in C by writing a program that selects and calls
different functions at runtime.
12. Explain dynamic memory allocation functions in C.

Applications Level Questions

1. Design suitable functions for an ATM application to perform:


 Balance enquiry
 Cash withdrawal
 Deposit

2. A college wants to process student marks for multiple [Link] a C program using
functions to:
 Read marks
 Compute total and percentage
BANGALORE INSTITUTE OF TECHNOLOGY
K. R. Road, V. Vv. Puram, Bengaluru- 560 004
Autonomous Institute, Affiliated to TU
Recognized by AICTE, New Delhi, India

 Assign grades

3. A system administrator wants a C program that takes file sizes as command-line arguments
and computes total memory usage.

4. The company wants to automate salary calculation for employees. Design a C program
using functions to:
 Accept employee details
 Calculate gross salary
 Deduct tax
 Display net salary

5. A hospital management system stores patient records dynamically. Design a C program


using functions to:
 Allocate memory for records
 Update records
 Free memory after discharge

You might also like