Question: The C++ code below needs to be updated to reflect the following: Add comments describing each variable (local and global) and what scope it has.
The C++ code below needs to be updated to reflect the following:
- Add comments describing eachvariable(localandglobal) and whatscopeit has.
- Add comments describing eachfunction declaration header 1.Include why eachpartis there and what it means.
- Add comments describing eachfunctioncall 1. Include why eachpartis there and what it means (each line of code needs to have comments describing what each line of code does)
Formal and Actual Parameters
#include #include usingnamespacestd; //functionprototypeforfunctiondefinedbelowmain //theparametersdeclaredintheprototypearetheformalparameters intadd(intx,inty); intmain() { intvar1=0; intvar2=1; //callthe`add`functionandprovidethearguments(actualparameters) intsum=add(var1,var2); cout<
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
