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

FP Practice Week 14 2

Uploaded by

Dorentt YT
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

FP Practice Week 14 2

Uploaded by

Dorentt YT
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

Week 14

Course: Fundamentals
of C++ Programming
Topic: Pointers. Passing Parameters
Practice 2
Task 1. Write a function that receives a pointer to an array
and its size and returns the sum and product of its elements
in two pointer parameters.
Task 2. Write a function that receives a pointer to an array
and its size and returns the number of negative, positive, and
zero elements in the array.
Task 3. Write a function that takes pointers to two arrays (A
and B) and array sizes as an argument. The function checks
whether array B is a subset of array A and returns a pointer
to the beginning of the found fragment, otherwise 0.
Task 4. Write a function that receives a pointer to a dynamic
array and its size. The function must remove all negative numbers
from the array and return a pointer to a new dynamic array.
Task 5. Create a function that adds a block of elements to
the end of an array.
Task 6. Create a function that inserts a block of elements
starting at arbitrary array index.
Task 7. Create a function that allows you to delete a block of
elements starting at arbitrary array index.
1

You might also like