Explain function prototypes in C++.



Explain function prototypes in C++...

Answer / Gurmeet Singh

A function prototype is a declaration of a function that provides information about the function's name, parameters, and return type. It helps the compiler to check the correctness of function calls by ensuring they have the appropriate arguments. In C++, function prototypes are typically defined before the implementation of the function.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ Interview Questions

Explain the difference between C and C++.

1 Answers   Accenture,


How will you execute a stack using a priority queue? (Push and pop should be in O (1)).

1 Answers   Adobe,


Define namespace.

2 Answers  


What are the different scope C++ provide ?

1 Answers   Amdocs,


What are the advantages/disadvantages of using inline and const?

1 Answers   Amazon,


What is the difference between public, private, and protected inheritance?

1 Answers   Amazon,


C++ supports multiple inheritance. What is the “diamond problem” that can occur with multiple inheritance? Give an example.

1 Answers  


How do you work around them?

1 Answers   Amazon,


What is Advantage and Use of THIS pointer in C++ – Scenarios?

1 Answers  


What is a virtual function in C++?

1 Answers   C DAC,


How does stack look in function calls? Write a recursive function call, how will the stack look like?

1 Answers   Adobe,


What do you know about Volatile keyword in C++? Explain with an example code.

1 Answers   Adobe,


Categories