Theory Questions:
1.
What is a structure?
2.
What is an ADT?
3.
What is the syntax for creating a structure?
4.
What is the size of a structure?
5.
What is the use of typedef?
6.
Does structure definition need a semicolon?
7.
Does structure definition exist inside main?
8.
How many structure can have in a program?
9.
Does structure can contain another structure?
10.
Built in structures?
a.
time
b.
FILE
11.
What is Structure initialization?
12.
What is Structure variable Assignment?
Programs (Task):
1.
Create a Employee structure with the following
a.
Members
i.
Empno
ii.
Ename
iii.
Job
iv.
Salary
b.
Use typedef and provide a alias Emp
c.
Declare a two variables for the structure
d.
Read data into the variables ( structure objects
)
e.
Display the data exist in structure object
f.
Display sum of two employee salaries.
2.
Declare two objects for employee stricture and
initialize the objects and display.
3.
Initialize two employee objects (a,b), copy the data into c,d objects and display.
4.
Declare an Address strcture with the following
a.
Members
i.
DNo
ii.
Street
iii.
City
iv.
Pin
b.
Declare 2 objects
c.
Read data
d.
Display data
5.
Declare structure Array Object for Employee
e[12];
a.
Assign data into array object
b.
Display all the employee data
c.
Display male employee
d.
Display female employee
e.
Sort data based on ename
6.
Declare strcture Array object for employee e[10]
a.
Read the data into array object
b.
Display in given order
c.
Display in reverse order
7.
Write a program for the following Menu
a.
Read Employee
b.
Dsiplay Employee
c.
Delete Employee
d.
Search Employee
e.
Edit Employee
f.
Exist
g.
Enter the choice :
8.
Declare a stricture object and initialize the
data
a.
Display using function with structure parameter
9.
Create A Time structure
a.
Declare three objects
b.
Assign in time in 1 structure variable
c.
Assign out time in another structure
d.
Display in and out times
e.
Fill the third structure with substation of in
and out
f.
Display the session duration.
10.
Create a Date structure
a.
Declare object
b.
Read the data by validating input.
c.
Display the data
No comments:
Post a Comment