What is prototype in c++ with example?



What is prototype in c++ with example?..

Answer / Sachin Kumar Chaubey

A prototype in C++ is a declaration of a function that provides information about its return type, name, and parameters. A prototype allows the compiler to check for syntax errors before the actual implementation of the function. An example of a prototype would be: void printHello(); This declares a function named 'printHello' that returns no value (void) and takes no arguments.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

How many types of comments are there in c++?

1 Answers  


Is c++ vector a linked list?

1 Answers  


How does com provide language transparency?

1 Answers  


Write any small program that will compile in "C" but not in "C++"?

4 Answers  


What is & in c++ function?

1 Answers  


Can a built-in function be recursive?

1 Answers  


Define friend function.

1 Answers  


What are its advantages and disadvantages of multiple inheritances (virtual inheritance)?

1 Answers  


What is meant by the term name mangling in c++?

1 Answers  


Why use of template is better than a base class?

1 Answers  


Which of the following operator cannot be overloaded?

2 Answers   TCL,


What is setiosflags c++?

1 Answers  


Categories