What Are the Rules for Naming a Function

They must start with a letter or an underscore: _.They should be lowercase.They can have numbers.They can be any length (within reason), but keep them short.They can’t be the same as a Python keyword.

What are the rules for naming a function in C?

Rules for naming a variable A variable name can only have letters (both uppercase and lowercase letters), digits and underscore. The first letter of a variable should be either a letter or an underscore. There is no rule on how long a variable name (identifier) can be.

How functions should be named?

A function name should clearly indicate what the function does. You don’t have to scroll around, open the function source code to understand how it works. Also, the name should describe only one concept: one-to-one relation.

Alexander Ross

Alexander Ross

Gaming, Esports & Interactive Media Writer

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.

Share this article
Twitter Facebook Pinterest