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:

  1. Add comments describing eachvariable(localandglobal) and whatscopeit has.
  2. Add comments describing eachfunction declaration header 1.Include why eachpartis there and what it means.
  3. 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!