What is the scope of the following variables? a. X, declared in the main program? b. X,
Question:
What is the scope of the following variables?
a. X, declared in the main program?
b. X, declared in the subprogram?
Transcribed Image Text:
Main Declare X As Integer, Y As Integer Set X = 1 Set Y = 2 Call Sub(X, Y) Write X Write Y End Program Subprogram Sub(Integer Numl, Integer Num2 As Ref) Declare X As Integer Set Numl = 3 %3! Set Num2 = 4 %3! Set X = 5 Write X End Subprogram
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 77% (9 reviews)
a Global t...View the full answer
Answered By
Nyron Beeput
I am an active educator and professional tutor with substantial experience in Biology and General Science. The past two years I have been tutoring online intensively with high school and college students. I have been teaching for four years and this experience has helped me to hone skills such as patience, dedication and flexibility. I work at the pace of my students and ensure that they understand.
My method of using real life examples that my students can relate to has helped them grasp concepts more readily. I also help students learn how to apply their knowledge and they appreciate that very much.
4.00+
1+ Reviews
10+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
What is the scope of a business continuity plan? How is it different from a disaster recovery plan?
-
What is the scope of small business marketing? Has it always been as broad as it is now? Why or why not?
-
What is the scope of security and privacy concerns commercial firms might have, and what tactics might a firm employ to address them. Is it truly the case that improvements in security and privacy...
-
On January 1, 2020, Dole, Inc., declared a 15% stock dividend on its common stock when the market value of the common stock was $20 per share. The date of record is January 30, 2020, and the...
-
What is a table of cases?
-
(Enter your response as a percentage with two decimal places, ex: 12.34) Question 3 1 pts Some time ago, you purchased a share of Bon Stock for $85.71. You recently sold the stock for $5.81 more than...
-
Why are many people not excited about being involved in marketing planning? Why is such planning important?
-
A beginning accounting student tried to complete a work sheet for Dick Ady's Bookkeeping Service. The following adjusting entries were to have been analyzed and entered in the work sheet: (a) Ending...
-
my answers are incorrect. Chapter 10 Problems 2 Part 1 of 3 Required Information [The following information applies to the questions displayed below) Wanting to finalize a sale before year-end, on...
-
Modify the lexical analyzer given in Section 4.2 to recognize the following list of reserved words and return their respective token codes: for (FOR_CODE, 30), if (IF_CODE, 31), else (ELSE_CODE, 32),...
-
List the local and global variables in this program. Main Declare X As Integer, Y As Integer Set X = 1 Set Y = 2 Call Sub(X, Y) Write X Write Y End Program Subprogram Sub(Integer Numl, Integer Num2...
-
Write a subprogram called Flip() that imports two variables from the main program (into parameters X and Y), interchanges their values, and exports the results to the main program.
-
Find the values of x and y for which the equations are valid. 3x 2j = yj 9
-
2. Getting ready for Logarithms and Calculus! a. Fill in the chart and graph the function (I advise practicing on your scientific calculator and desmos. X f(x) = Inx 0 0.5 1 e 10...
-
JoJo Co. had the following balances and information for October. Beg. finished goods inventory = $30 Beg. work in process inventory = $5 Beg. raw materials inventory = $15 End. finished goods...
-
Subway sales have been declining since 2014. In the US, Subway has closed a number of stores due to over-expansion, outdated operations, and uninspiring menus. In Canada, Subway took a different...
-
Harvey Auto Parts purchased a new crane on September 1 for $35,000, paying $10,000 cash and signing a 7%, 12-month note for the remaining balance, interest to be paid at maturity. The crane is...
-
e4(k+1) Find the sum of the series. k = 1 8
-
Write a paper on the use of geometry in the photographic process. Include discussions on the use of similar figures.
-
Arlington Merchants reported the following on its income statement for the fiscal years ending December 31, 2016 and 2015. 2016 2015 Sales $4,857,500 $4,752,900 Cost of goods sold 3,258,950 3,207,000...
-
Can each of the following be the value of the TTL in a datagram? Explain your answer. a. 23 b. 0 c. 1 d. 301
-
Which fields of the IPv4 main header may change from router to router?
-
Compare and contrast the protocol field at the network layer with the port numbers at the transport layer. What is their common purpose? Why do we need two port-number fields but only one protocol...
-
Product Weight Sales Additional Processing Costs P 300,000 lbs. $ 245,000 $ 200,000 Q 100,000 lbs. 30,000 -0- R 100,000 lbs. 175,000 100,000 If joint costs are allocated based on relative weight of...
-
The projected benefit obligation was $380 million at the beginning of the year. Service cost for the year was $21 million. At the end of the year, pension benefits paid by the trustee were $17...
-
CVP Modeling project The purpose of this project is to give you experience creating a multiproduct profitability analysis that can be used to determine the effects of changing business conditions on...
Study smarter with the SolutionInn App