ExamVeda
Login
Home
Object Oriented Programming Using C Plus Plus
?

You define a structure type globally because

Answer & Solution
Correct Answer: Option A
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.
Examveda
Question posted by Examveda
Community

Join the Discussion

1 Comment
Generative Ai
Generative Ai 3 years ago
why A become the answer? please give explanation with it we do not have time to discuss with your board!