Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
54 views
in General by (96.5k points)
closed by

Direction: The question consists of two statements, one labeled as 'Statement (I)’ and the other as 'Statement (II)’. Examine these two statements carefully and select the answer using the codes given below:

Statement (I): Variables that are defined inside subprograms are local variables.

Statement (II): Their scope is in the body of the subprogram in which they are defined.


1. Both Statement (I) and Statement (I) are individually true and Statement (II) is the correct explanation of Statement (I)
2. Both Statement (I) and Statement (II) are individually true but Statement (II) is not the correct explanation of Statement (I)
3. Statement (I) is true but Statement (II) is false
4. Statement (I) is false but Statement (II) is true

1 Answer

0 votes
by (85.8k points)
selected by
 
Best answer
Correct Answer - Option 1 : Both Statement (I) and Statement (I) are individually true and Statement (II) is the correct explanation of Statement (I)

Local variables are defined in the subprogram which is not accessible outside of the subprogram.

Global variables:

Variables that are defined outside any function are known as global variables. These are visible (scoping) for all the functions within the program.

Local variables:

Variables that are defined inside any function are known as local variables. These are having visibility within the function where these are defined.

Hence, both statement is true and statement (II) is the correct explanation of statement (I)

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...