HOME C C++ PYTHON JAVA HTML CSS JAVASCRIPT BOOTSTRAP JQUERY REACT PHP SQL AJAX JSON DATA SCIENCE AI

Variable Names


C variable names are identifiers used to hold values in your program. They act as labels for memory locations where data is stored. Choosing good variable names is crucial for readability, maintainability, and understanding your code.

Example

#include

int main() {

// Good variable name

int minutesPerHour = 60;


// OK, but not so easy to understand what m actually is

int m = 60;


printf("%d\n", minutesPerHour);

printf("%d", m);

return 0;

}


Output


60

60


The general rules for naming variables are: