× Didn't find what you were looking for? Ask a question
Top Posters
Since Sunday
5
a
5
k
5
c
5
B
5
l
5
C
4
s
4
a
4
t
4
i
4
r
4
New Topic  
ian18 ian18
wrote...
Posts: 223
Rep: 0 0
5 years ago
What is wrong with the following program segment?
      Main
         Declare Apples As Integer
         Set Apples = 4
         Call Snack(Apples)
         Write “You have “ + Apples + “ apples”
         Write “and “ + Oranges + “ oranges”
        End Program
        Subprogram Snack(Fruit)
         Declare Oranges As Integer
         Set Oranges = Fruit + 2
        End Subprogram
a.   you cannot call a subprogram that has only one parameter
b.   you cannot declare variables within a subprogram
c.   you cannot access a variable that has been declared locally within a subprogram outside that subprogram
d.   nothing is wrong with the code segment
Textbook 
Prelude to Programming

Prelude to Programming


Edition: 6th
Authors:
Read 60 times
1 Reply
Replies
Answer verified by a subject expert
godinggoding
wrote...
Posts: 267
Rep: 5 0
5 years ago
Sign in or Sign up in seconds to unlock everything for free
More solutions for this book are available here
1

Related Topics

ian18 Author
wrote...

5 years ago
Thanks
wrote...

Yesterday
I appreciate what you did here, answered it right Smiling Face with Open Mouth
wrote...

2 hours ago
Smart ... Thanks!
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  1348 People Browsing
Related Images
  
 1656
  
 342
  
 115
Your Opinion
Which 'study break' activity do you find most distracting?
Votes: 741