× 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 59 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
This calls for a celebration Person Raising Both Hands in Celebration
wrote...

2 hours ago
I appreciate what you did here, answered it right Smiling Face with Open Mouth
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  1317 People Browsing
Related Images
  
 115
  
 268
  
 273
Your Opinion
What percentage of nature vs. nurture dictates human intelligence?
Votes: 431

Previous poll results: Who's your favorite biologist?