Examveda

What is the correct syntax to define a function named 'add' that takes two integers as parameters and returns their sum in C++?

A. int add(int a, b) { }

B. int add(int a, int b) { }

C. int add(a, b) { }

D. None of the above

Answer: Option B


Join The Discussion

Related Questions on Introduction to C plus plus