We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Scaling Coordinate

Remember how we can not return multiple values from a function in C? We can't do this:

int, char * become_older(int age, char *name) {
  return age + 1, name;
}

However, we can accomplish effectively the same thing by returning a struct:

struct Human become_older(int age, char *name) {
  struct Human h = {.age = age, .name = name};
  h.age++;
  return h;
}

Assignment