Get premium membership and access questions with answers, video lessons as well as revision papers.

What is wrong with the following function prototype? char *f(char *p, int x =0, char *q);

      

What is wrong with the following function prototype?

char *f(char *p, int x =0, char *q);

  

Answers


Davis
All parameters with default arguments must appear to the right of those that do not. That is, once you begin giving parameters default, all subsequent parameters must also have defaults. In the question, q is not given a default
Githiari answered the question on May 31, 2018 at 18:10


Next: Given the following class definition, class test{ char *p; int *q; int count; public: test(char *x, int *y, int c) { p = x; q = y; count = c; } //... }; Is it possible...
Previous: Organisations in the private and public sectors demonstrate social responsibility. Describe the benefits to organisations within each of these sectors of pursuing such a policy....

View More Computer Studies Questions and Answers | Return to Questions Index


Learn High School English on YouTube

Related Questions