Answer to Question #207631 in C++ for KSSS

Question #207631

Encode, compile and run the following programs and do the following:

1. Identify the format of the function used: no return type & no parameter, with return type & no parameter, no return type & with parameter and with return type & with parameter.

2. Identify the format and actual parameters.

3. Identify the function signature

4. Identify parameter if value parameter, reference parameter or constant reference parameter is used.

5. Identify the the scope of variable used.

6. Identify the type of C++ function is used.

7. Video record the output and your answer with your screen, voice and face.

8. Upload the video and submit the link here.

9. Also, the PDF file of your answer commented in the line of code.

10. Upload the pdf file with the video recording and submit the link here.


*Note : see picture :https://drive.google.com/file/d/1YTeWprIxJjTWR-XiOs9dYfFUnxhO56_8/view?usp=sharing


codes:

PDF: https://drive.google.com/file/d/15NWjP9t0s1NIWHU9Bdqr9DkBbPrtUojO/view?usp=sharing


1
Expert's answer
2021-06-17T05:24:42-0400
2) /*
This program demos void functions using
  value parameters vs. reference parameters

Reference Parameter:
If a formal parameter is a reference parameter, it
receives the address of the corresponding actual
parameter

A reference parameter stores the address of the
corresponding actual parameter

During program execution to manipulate the data,
the address stored in the reference parameter directs
it to the memory space of the corresponding actual
parameter
*/

//header files
#include<iostream>
using std::cout;
using std::cin;
using std::endl;

//prototype functions
void readDate(int& month, int& day, int& year); //reference parameters
void printDate(int month, int day, int year); //value parameters

//initialize constants

//initialize global variables

int main()
{
  //initialize automatic variables
  int mm, dd, yy;
  readDate(mm, dd, yy);
  printDate(mm, dd, yy);

  cout << "Press Enter key to exit...";
  cin.get(); cin.get(); // make DOS window stay open

  return 0;
}

//function definitions
void readDate(int& month, int& day, int& year)
{
  char ch; //local variable
  cout << "Enter a date (mm/dd/year): ";
  cin >> month >> ch >> day >> ch >> year;
}
 
void printDate(int month, int day, int year)
{
  cout << "The date is " << month << '-' << day;
  cout << '-' << year << endl;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

Assignment Expert
17.06.21, 14:16

Dear KSSS ,

Questions in this section are answered for free. Although if you have serious assignment that requires large amount 

of work and hence cannot be done for free you can submit it as assignment and our 

experts will surely assist you.



KSSS
17.06.21, 13:31

HEY THIS IS INCOMPLETE!!!!! I GAVE GAVE THE PDF FILE AND THE PICTURE AND THEY MUST BE ANSWERED!!! WHY IS THERE ONLY ONE ANSWER HUH!!!! AND DO NOT COMBINE THE CODES THEY ARE INDIVIDUAL CODES, EACH MUST BE ANSWERED

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS