Challenge: Set the Odd Elements in a Dynamic Array to -1

Test your knowledge by solving a challenge in this lesson.

Problem statement

Your task is to write a function set_odd. In function parameters, we will pass:

  • Pointer arr that will point to an array of type int

  • The size of an int array

Get hands-on with 1200+ tech skills courses.