How could a programmer make the variables in main available to other functions?

What will be an ideal response?


The programmer can pass the address of the variables to other functions, using either an explicit call (pass the address using the & operator to a pointer) or an implicit call using a reference variable. Either way, the function has access to main’s variables because the function has the variables’ addresses.

Computer Science & Information Technology

You might also like to view...

What is involved with documenting why an item should be purchased?

What will be an ideal response?

Computer Science & Information Technology

Match the following terms to their meanings:

I. Outlook 2016 II. mailto: III. Microsoft Edge IV. HTML V. Protocol A. HTML attribute that identifies text as an email address B. email client C. authoring language of webpages D. set of rules for communication E. web browser

Computer Science & Information Technology

When multiple windows are open, ________ can be used to minimize all but the active window

Fill in the blank(s) with correct word

Computer Science & Information Technology

Match the following terms with their descriptions:I.Attachment controlII.Attachment fieldIII.Fixed-length text fileIV.CSV text fileV.HyperlinkA.Can take you to a websiteB.Uses commas to indicate columnsC.Assigns a number of characters for each fieldD.Files which can be launched from AccessE.Allows you to manage attachments in forms and reports

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology