Home » , » c - variable

c - variable

 variables in C programming 

Variable names in C Language are the names given to places in memory. These areas can be an integer, characters, or actual constants. In addition, a variable kind can solely preserve the identical steady type. In this lesson, we will examine how to work with Variables in C Programming. 
   

rules of variable naming

The first character in a variable name must be an underscore or alphabet. Here are the rules, with some examples,
  • A variable name is a combination of alphabets 1 to 31, digits, or underscores.



  • No special symbol in a variable name is valid, except the underscore.

  • No comma is allowed in a variable name.
  • In addition, no blank space is valid.
Always try to create meaningful names. For example, the variable names for calculating the results of students can be given variable name results.

Variable Declaration

Declaration of a variable in C language is quite easy. The following is the syntax showing how to declare variables in C programming,




The preceding examples show how a variable is declared, wherein a datatype precedes the variable name.

The following examples demonstrate the usage of variables in C Programming,











If you liked the tutorial, spread the word and share the link and our website LANGUAGE CODING  with others.

0 comments:

Post a Comment

Popular Posts

GENRES

 
Copyright ©

latest code update bloggingskillBest coding website in india

Created By Sora Templates | Distributed By Gooyaabi Templates