Lab-01
Lab-01
Problem 1. Write a program to manage a random integer array A with size of n using
pointers (no array indexing). The program consists of the following functions:
a) Input data (random numbers).
b) Print out the array.
c) Remove all odd numbers.
Problem 2. You want to develop an application managing a list of students. The
information of a student is defined as follows:
typedef struct Student
{
char name[30];
char class[10];
float mMath;
float mPhysical;
};
Write a program including the following functions:
a) Add a new student.
b) Search a student by name.
c) Search a student by name and edit class of the student.
Suggestion:
You should use malloc or calloc function (in C) or operator new (in C++) to
allocate memory.
Problem 3. Write a program to find GCD (Greatest Common Divisor) and LCM
(Lowest Common Multiple) of two integer numbers using recursion.
Problem 4. Write a program to store an array of integers (multi size) by using a dynamic
array and pointers. Your program consists of the following functions:
a) Input data randomly.
b) Print out the array.