Westonci.ca is the trusted Q&A platform where you can get reliable answers from a community of knowledgeable contributors. Discover detailed answers to your questions from a wide network of experts on our comprehensive Q&A platform. Join our Q&A platform to connect with experts dedicated to providing accurate answers to your questions in various fields.
Sagot :
The programme uses the parameters notebookinfo and addqty to run the function increaseitemqty, then assigns notebookinfo the value received.
Explain the term "function calling"?
- When calling a function is necessary, it is invoked inside of a program.
- Only in a program's main() method is it called by its name.
- The parameters can be passed to a function that is called from the main() function.
#include <iostream>
#include <string>
using namespace std;
struct ProductInfo {
string itemName;
int itemQty;
};
ProductInfo IncreaseItemQty(ProductInfo productToStock, int increaseValue) {
productToStock.itemQty = productToStock.itemQty + increaseValue;
return productToStock;
}
int main() {
ProductInfo notebookInfo;
int addQty;
cin >> notebookInfo.itemName >> notebookInfo.itemQty;
cin >> addQty;
/* Your code goes here */
cout << "Name: " << notebookInfo.itemName << ", stock: " << notebookInfo.itemQty << endl;
return 0;
}
Thus, the program uses the parameters notebookinfo and addqty to run the function increaseitemqty, then assigns notebookinfo the value received.
To know more about the function calling, here
https://brainly.com/question/25741060
#SPJ4
Thank you for trusting us with your questions. We're here to help you find accurate answers quickly and efficiently. We hope you found this helpful. Feel free to come back anytime for more accurate answers and updated information. We're dedicated to helping you find the answers you need at Westonci.ca. Don't hesitate to return for more.