Monday 3 December 2012

Variables name in C

Variable is the name given to the memory location, it is not the actual memory, it is just the name to the memory location.

Variable name can be in UPPER CASE or it can be also in lower case.

Variable can also have underscore( _ ) and numbers. Apart from this variable can't have anything else.

Variable can be started with only alphabets ( UPPER and lower case) and underscore but not with numbers , numbers and underscore can be used in the middle of the variables.



Note: Variable cant be key words also.



Example of valid variable name:

_sam

S_m

sam125

jntu_34

Example of In-valid variable name:

1sam (because variable can't start with number)

sam23@ (because variable can't have anyother special character apart from _ )

void (because Keyword can't be a variable )

No comments:

Post a Comment

Best geography books for UPSC prelims, mains

This post is intended to clear the confusion that prevails among the aspirants over how to prepare for UPSC geography and the best books f...