[go: up one dir, main page]

0% found this document useful (0 votes)
48 views2 pages

Programming Keywords and Identifiers

Keywords are fixed reserved words in programming that must be written in lowercase. Identifiers are user-defined names for variables, functions, and arrays, following specific rules such as starting with a letter or underscore and not using keywords. Variables are data names that can change values during program execution, with naming conventions similar to identifiers.

Uploaded by

lekshminairms9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views2 pages

Programming Keywords and Identifiers

Keywords are fixed reserved words in programming that must be written in lowercase. Identifiers are user-defined names for variables, functions, and arrays, following specific rules such as starting with a letter or underscore and not using keywords. Variables are data names that can change values during program execution, with naming conventions similar to identifiers.

Uploaded by

lekshminairms9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Keywords

Keywords are reserved words. All keywords have fixed meanings and these meanings cannot be changed.
Keywords serve as basic building blocks for program statements. All keywords must be written in lowercase.

Identifiers
Identifiers refer to the names of variables, functions and arrays. These are user-defined names and consist of a
sequence of letters and digits, with a letter as a first character. Both uppercase and lowercase letters are
permitted, although lowercase letters are commonly used. The underscore character is also permitted in
identifiers.

Rules for Identifiers

1. First character must be an alphabet (or underscore).


2. Must consist of only letters, digits or underscore.
3. Only first 31 characters are significant.
4. Cannot use a keyword.
5. Must not contain white space

variable
A variable is a data name that may be used to store a data value. Unlike constants that remain
unchanged during the execution of a program, variable may take different values at different times
during execution. Variable names may consist of letters, digits, and the underscore(_) character,
subject to the following conditions:
1. They must begin with a letter. Some systems permit underscore as the first character.
2. ANSI standard recognizes a length of 31 characters.
3. Uppercase and lowercase are significant.
4. That is, the variable Total is not the same as total or TOTAL.
5. It should not be a keyword.
6. White space is not allowed.
7.

You might also like