Write a program using display() function which takes two arguments.



Write a program using display() function which takes two arguments...

Answer / Ambikesh Kumar Shukla

Here's an example of a simple C++ program that defines and uses a display() function that takes two arguments. n```n#include <iostream>nvoid display(int x, int y) {n std::cout << "The values are: x = " << x << " and y = " << y << std::endl;n}nint main() {n display(5, 10); // calling the function with arguments 5 and 10n return 0;n}n```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What is the output of printf("%d")?

58 Answers   CTS, HCL, Infosys, TCS, Winit, Wipro,


What is the use of setfill in c++?

1 Answers  


How do you allocate and deallocate memory in C++?

1 Answers  


Difference between Operator overloading and Functional overloading?

10 Answers   HP,


Define a program that reads two matrices of size 3x3 with real values from the user then prints their sum, difference and multiplication.

0 Answers   TCS,


Explain the concept of inheritance in C++.

3 Answers  


How can you quickly find the number of elements stored in a dynamic array?

1 Answers  


How the endl and setw manipulator works?

1 Answers  


What is a built-in function?

1 Answers  


Will a recursive function without an end condition every quit, in practice a) Compiler-Specific (Some can convert to an infinite loop) b) No c) Yes

1 Answers  


What are abstract data types in c++?

1 Answers  


difference between c and c++?

38 Answers   Cognizant, IBM, Infosys, Oracle, Sarva Shiksha Abhiyan, Wipro,


Categories