Unit1 Assignment
Unit1 Assignment
Unit1 Assignment
1. Describe with example, the different ways of assigning values to structure members.
2. Distinguish between: Structure and Array
3. Distinguish between: Structure and Union
4. Explain (1) Array of Structure (2) Array within Structure
5. Explain nested structure (structure within structure) with example.
6. Explain with example how a structure is passed as function argument.
Programming Assignment:
1. Define a structure data type called time_struct containing three members integer
hour, integer minute, integer second.
a. Write a C program that would assign values to the individual members and
display the time in the format 16:40:51
b. Write a C program that a function is used to input values to the members
and another function to display the same.
2. Define a structure that describes a student having members Roll_no, Name,
Mark1, Mark2, Mark3. Write a program for five students to print the total marks
and average of marks for each student.
Procedural Oriented
Programming Object-Oriented Programming
Adding new data and functions is not Adding new data and function is
easy. easy.
Object-oriented programming is
Procedural programming is used for
used for designing large and
designing medium-sized programs.
complex programs.