× Didn't find what you were looking for? Ask a question
Top Posters
Since Sunday
a
5
k
5
c
5
B
5
l
5
C
4
s
4
a
4
t
4
i
4
r
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 56 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
Smart ... Thanks!
wrote...

Yesterday
Thanks
wrote...

2 hours ago
Helped a lot
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  1367 People Browsing
 127 Signed Up Today
Related Images
  
 308
  
 976
  
 114