EE 305 –PROGRAMMING IN C
ASSIGNMENT QUESTIONS
1. Basics of C Programming
a. Explain how the evolution of C from earlier programming languages (like B and Assembly)
influenced modern programming practices.
b. Write a complete program that demonstrates constants, variables, keywords, identifiers,
multiple data types, operator precedence, and input/output using both `scanf` and `printf`.
Comment on common errors students make while compiling and executing such a program.
2. Decision and Loop Control Statements
a. Design a grade-analysis program for a class of 50 students. Input marks for three subjects per
student, calculate averages, assign grades using nested `if-else` and `switch`, and count how
many students scored above the class average using loop constructs.
b. Demonstrate use of `break`, `continue`, null statement, and comma operator. Provide both
logic and code.
3. Arrays and Strings
a. Develop a menu-driven library system in C using arrays and strings. Store names of 100 books,
allow adding, removing, searching, and sorting them alphabetically. Use at least three string
handling functions (`strcmp`, `strlen`, `strcpy`).
b. Explain limitations of arrays in managing such data and suggest how dynamic memory or
structures might improve the design.
4. User Defined Functions
a. Write a program to simulate a mini banking system with operations like account creation,
deposit, withdrawal, and balance inquiry. Each operation should be a user-defined function.
Demonstrate use of different return types, parameter passing methods, and all four storage
classes (`auto`, `static`, `register`, `extern`). Explain the importance of function prototypes when
organizing modular programs.
5. Structures, Unions, and Pointers
a. Create a student record management system using structures, unions, and pointers.
Implement storing and updating student data, passing structure members to functions, using
`sizeof` on structures and unions, and accessing records dynamically via pointers. Show how
arrays of pointers can be used for sorting student names.
b. Discuss the role of conditional preprocessor directives (`#define`, `#include`, `#ifdef`) in
managing large projects.
BHARATH KUMAR K.
L/EEE
SVGP TIRUPATI