Q:

Which, if any, of the following calls are illegal? Why? Which, if any, are legal but unlikely to match the programmer’s intent? Why

0

Which, if any, of the following calls are illegal? Why? Which, if any, are legal but unlikely to match the programmer’s intent? Why?

char *init(int ht, int wd = 80, char bckgrnd = ' ');

(a) init();

(b) init(24,10);

(c) init(14, '*');

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

(a) `init();` is illegal, must have at least one argument.

(b) `init(24, 10);` is legal.

(c) `init(14, '*');` is legal, but unlikely to match the programer's intent. Because the character `*` will be promoted to `int` and match `wd`.

 

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now