Q:

Which, if either, of the following declarations are errors? Why

0

Which, if either, of the following declarations are errors? Why?

(a) int ff(int a, int b = 0, int c = 0);

(b) char *init(int ht = 24, int wd, char bckgrnd); 

All Answers

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

(a)

int ff(int a, int b = 0, int c = 0);  // OK

(b)

char *init(int ht = 24, int wd, char bckgrnd);
    // Error, all the parameters followed `ht` must also have default argument.

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