Which statement below about prototypes and function headers

Which statement below about prototypes and

function headers is true?

A. Parameter names must be listed in the

prototype, but not necessarily in the header.

B. Prototypes end with a semicolon; headers do not.

C. Headers should come before prototypes.

D. Headers end with a semicolon; prototypes don\'t.

E. Headers and prototypes are the same thing.

c++

Solution

Hi, Please find my answer and explanation.


A. Parameter names must be listed in the prototype, but not necessarily in the header.
    False : Parameter names must be listed in the header, but not necessarily in the prototypes.
B. Prototypes end with a semicolon; headers do not.
    Yes
C. Headers should come before prototypes.
    False : prototypes should come before headers.
D. Headers end with a semicolon; prototypes don\'t.
    False: prototypes end with a semicolon; prototypes don\'t.
E. Headers and prototypes are the same thing.
    False: both are different

Ans: B

Which statement below about prototypes and function headers is true? A. Parameter names must be listed in the prototype, but not necessarily in the header. B. P

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site