0% found this document useful (0 votes)
10 views1 page

Lab-01

The document outlines a lab assignment focused on C/C++ programming, consisting of four problems. Problem 1 involves managing a random integer array using pointers, Problem 2 requires developing a student management application, Problem 3 is about finding GCD and LCM using recursion, and Problem 4 entails storing and managing a dynamic array of integers. Each problem specifies required functions and suggests using dynamic memory allocation techniques.

Uploaded by

thunta.24ite
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views1 page

Lab-01

The document outlines a lab assignment focused on C/C++ programming, consisting of four problems. Problem 1 involves managing a random integer array using pointers, Problem 2 requires developing a student management application, Problem 3 is about finding GCD and LCM using recursion, and Problem 4 entails storing and managing a dynamic array of integers. Each problem specifies required functions and suggests using dynamic memory allocation techniques.

Uploaded by

thunta.24ite
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Lab 1 - Function, Pointer, Recursion (C/C++)

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.

You might also like