127k views
3 votes
Which of the following is a true statement?

a. Message body in reachable by the main program.

b. Two methods can have the same header.

c. Formal and actual parameters may have the samenames.

d. Local variables are recognized by the mainprogram.

User Tomoya
by
5.7k points

2 Answers

4 votes

Answer:

d. Local variables are recognized by the main program.

Step-by-step explanation:

Local variables are recognized by the main program, is a true statement.

However, message body in reachable by the main program, two methods can have the same header, and formal and actual parameters may have the same names are NOT true statements.

User Category
by
5.4k points
4 votes

Answer: D. Local variables are recognized by the main program

Step-by-step explanation: Local variables can be accessed in the function that they are defined within .If you require the variables which should be accessible by every function in a particular program the they should be defined globally in the program . Therefore local variables are recognized by the main program throughout.