189k views
0 votes
Which of the following function headings arevalid? If they are invalid, explain why.

a. One(int a, intb) valid invalid

b. intThisOne(charx) valid invalid

c. char Another(int a,b) valid invalid

d. doubleYetAnother valid invalid

1 Answer

5 votes

Answer:

a.invalid

b.invalid

c.invalid

d.invalid

Step-by-step explanation:

For option a return type of the function is not specified and there is no space between int and b.

For option b there is no space between int and ThisOne and char and x.If there is space then this is valid.

For option c data type of variable b is not specified.

For option d if YetAnother function is without arguments then parenthesis should be there parenthesis are missing in this function heading.

User Ileane
by
5.7k points