Concept

How do you declare variables in C?

ComputerScienceOne / Declaration & Assignment

"C is a statically typed language meaning that all variables must be declared before you can use them or refer to them. In addition, when declaring a variable, you must specify both its type and its identifier. For example:\n\nint numUnits;\n\ndouble costPerUnit;\n\nchar firstInitial;\n\nEach declaration specifies the variable’s type followed by the identifier and ending with a semicolon. The identifier rules are fairly standard: a name can consist of lower and uppercase alphabetic characters, numbers, and underscores but may not begin with a numeric character. We adopt the modern camelCasing naming convention for variables in our code."

Related Ideas

How do you declare variables in C? | ComputerScienceOne | Bifalgorithm | Bifalgorithm