You define a structure type globally because
A. you save many lines of code by not rewriting an identical structure definition in each function that uses it
B. you will never change its definition
C. it is required in C++
D. all of the above
Answer: Option A
Solution (By Examveda Team)
You define a structure type globally because you save many lines of code by not rewriting an identical structure definition in each function that uses it.Defining a structure globally ensures that all functions within the program can access and use the same structure definition without redundancy.
This practice promotes code reusability and maintainability, as changes to the structure only need to be made in one place.
Defining structures globally is not a requirement in C++, but it is a common practice to avoid repetitive code and potential inconsistencies.
Join The Discussion
Comments (1)
Related Questions on Object Oriented Programming Using C Plus Plus
A. all thrown objects
B. no thrown objects
C. any thrown object that has not been caught by an earlier catch block
D. all thrown objects that have been caught by an earlier catch block
Format flags may be combined using
A. the bitwise OR operator (|)
B. the logical OR operator (||)
C. the bitwise AND operator (&)
D. the logical AND operator (&&)
E. None of the above

why A become the answer? please give explanation with it we do not have time to discuss with your board!