Argument Checking

Be careful while inputting arguments to a function.

Note that if we pass an argument of the wrong type to a function, the program may still compile, and even run, and it will simply spit out crazy values. Sometimes we will get a compiler warning, but sometimes not.

Run the code below and examine the output.

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy