Which statement below about prototypes and headers is true?

NetherCraft 0
28. Which statement below about prototypes and headers is true? Parameter names must be listed in the prototype, but not nece

Also Check This  Where should I put my Subwoofer that goes with my Soundbar? Is it right the way I have it as of now?

Answer

28 . b) Prototypes end with a semicolon, but headers do not

(The prototype of a function is declaration of a function, that
tells the compiler that there is a function with such name, return
type and parameters, that can be defined anywhere else in the whole
program.

E.g. int add(int,int); )

29) c) (x>0) && (x<=0)

( this case will be true only when, the value of x is greater
than 0 and at the same time, less than or equal to 0. This is never
possible for any integer value of x )

Also Check This  What exactly is “dashi” and what can be use as a substitute?

30) c) linker

( A linker combines or links the object files with the
corressponding library files)

Question II)

1.

void fun(int &arg1, double &arg2, string &arg3)

{

arg1 = 0;

arg2 = 0.0;

arg3 =””;

}

2.

int limit,entry,triple;

cin>>limit;

for(int reps = 0; reps < limit; reps++)

{

cin>>entry;

triple = entry * 3;

cout<<triple;

}

cout<<endl;


Leave a Reply

Your email address will not be published.