N/APosted on - 07/21/2011
I have a question in my mind; can anybody please help me? When we design code, if we use KEYWORDS as a variable for our own use in code an ERROR is usually displayed that "IT IS A RESERVED WORD". Why can't we use a keyword as a variable? Please explain any solid reason behind it.
Why we cannot use keywords as a variable
Hi Good Day,
The reason we cannot use it to declare a variable from the C programming is because the keywords are defined in the C language for specific purposes. If we declare a variable with the same name, the compiler would not know if you are trying to use a variable or that you are trying to perform an action with that keyword. That keyword cannot be used as a variable name.
Hope this will help to solve your problem.