Skip to content

BarbaraOzar/c-exercises-02

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

C Programming - Exercises Session 02

Pointers, Arrays and Memory Management

  1. Implement a program with a main function and two other functions:

    • power(int x, int y) – should return “x to the power of y”, for instance power(2,3)=8
    • multiSwap – should take three integer-parameters x, y and z. After a call to multiSwap, x should be equal to the old y, y should be equal to the old z and z should be equal to the old x. The return type of multiSwap should be void.
  2. Write a function named sum_arrays that takes two arrays as parameters, totals the values in both arrays and returns the total. Test your function by making a program that calls it.

  3. Write a function that takes two integer arrays as parameters, combines and sorts the values into a new array and returns that array. Make a program that calls your function and verifies the result.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages