1. Function and Array: Calculate Average
This program uses a function to calculate the average of elements stored in an array. The array is passed to the function, and the average is returned.
2. User-Defined Data Type (Struct): Student Record
This program defines a structure (
struct Student) to store student details (name, roll number, marks). It creates a variable of this type and displays the information3. Array of User-Defined Data Types and Functions: Manage Multiple Students
This program combines arrays and structures. It creates an array of
struct Student and uses a function to input details for multiple students and another function to display them. 4. Pointers: Swap Two Numbers
This program demonstrates the use of pointers to modify variables outside the function's scope. The
swap function takes the addresses of two integers and uses pointers to exchange their values directly.
0 Comments