× Didn't find what you were looking for? Ask a question
Top Posters
Since Sunday
5
o
5
4
m
4
b
4
x
4
a
4
l
4
t
4
S
4
m
3
s
3
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 53 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
this is exactly what I needed
wrote...

Yesterday
Smart ... Thanks!
wrote...

2 hours ago
Good timing, thanks!
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  1047 People Browsing
Related Images
  
 1050
  
 323
  
 337