× 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 57 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
You make an excellent tutor!
wrote...

Yesterday
This helped my grade so much Perfect
wrote...

2 hours ago
Thanks for your help!!
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  1282 People Browsing
Related Images
  
 978
  
 341
  
 379
Your Opinion
What's your favorite funny biology word?
Votes: 328

Previous poll results: How often do you eat-out per week?