1. C++ LAB 1
1. Objectives
1. Arrays:
a. How to declare an array
b. How to access a certain element
c. For Loop for array input and output
2. 2D Arrays.
3. Strings:
a. Strings as a special array of characters
b. The String terminator: '0'
c. String Functions: gets( ), strlen( ), strcat( ), strcpy( ),
strcmp( ),puts().
4. Structures.
a. Defining Structures
b. Declaring a variable of a Structure
c. Accessing the fields.
5. Array of Structures.
a. Example by code on Employee Structure
6. Modularity:
a. function prototype
b. function name, parameters ,return type
c. function body
2. Assignments
1. Get Minimum and Maximum value of an array.
2. Calculate sum of each row in a 2D Array.
a. Bonus: Calculate average of each column in a 2D
Array.
3. Receive first name and last name, and concatenate them in
one name and display on screen.
4. Receive one employee's data and display code, name, and
net salary.
5. Receive data into an array of 5 employees, then display
code, name, and net salary for each.
6. Employee with Functions: NewEmployee and
DisplayEmployee.
Notes: puts,gets <stdio.h>