Consider this function declaration of is_even, which takes in an integer and returns true if the argument is an even number and false otherwise. Which declarations are correct for overloaded versions of that function to support floating point numbers and string representations of numbers?

Advertisement

There are 2 different answer option(s) of this question, please select the right option(s).

bool is_even(int);

  • A
    bool is_even(float f);
    bool is_even(char *str);
  • B
    bool is_even(float f);
    bool is_even(char str);
  • C
    bool is_even_float(float f);
    bool is_even_str(char *str);
  • D
    float is_even(float f);
    char *is_even(char *str);

or

bool is_even(int);

  • bool is_even(float f); bool is_even(char *str);
  • bool is_even(float f); bool is_even(char str);
  • bool is_even_float(float f); bool is_even_str(char *str);
  • float is_even(float f); char *is_even(char *str);
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Leave a Comment


Share via
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Send this to a friend