Embed presentation
Download to read offline
![Write anoverloaded functionAdd( ) that takes two parameters ofthe same type.The possible types ofthe arguments are type double, int, and
char array[ ]. (Hint:define three Add().) Write a test driver and ask the user ifhe/she would like to add two doubles, two int, or two character
arrays. Inthe case ofaddingtwo char arrays, just output the two arrays one after the other usingtwo cout statements.](https://image.slidesharecdn.com/1856-180712144406/75/Write-an-overloaded-function-Add-that-takes-two-parameters-of-the-same-type-The-possible-types-of-1-2048.jpg)
The document describes the implementation of an overloaded function 'add()' that handles two parameters of the same type, specifically for double, int, and char array types. It instructs to define three separate 'add()' functions for each type. Additionally, a test driver is needed to prompt the user for their choice of addition operation and to display character arrays sequentially.
![Write anoverloaded functionAdd( ) that takes two parameters ofthe same type.The possible types ofthe arguments are type double, int, and
char array[ ]. (Hint:define three Add().) Write a test driver and ask the user ifhe/she would like to add two doubles, two int, or two character
arrays. Inthe case ofaddingtwo char arrays, just output the two arrays one after the other usingtwo cout statements.](https://image.slidesharecdn.com/1856-180712144406/75/Write-an-overloaded-function-Add-that-takes-two-parameters-of-the-same-type-The-possible-types-of-1-2048.jpg)