You are here: Home / Topics / Why do we declare a variable in a program?

Why do we declare a variable in a program?

Filed under: C Programming on 2022-07-05 21:40:37

Declaring a variable provides the compiler with an assurance that there is a variable that exists with that very given name. This way, the compiler will get a signal to proceed with the further compilation without needing the complete details regarding that variable.
The declaration of variables is useful when we use multiple numbers of files and we define the variables in one of the files that might be available during the time of program linking.

About Author:
P
Parvesh Kanani     View Profile
Hi, I am using MCQ Buddy. I love to share content on this website.