CONSTANTS,VARIABLES AND KEYWORDS:
CONSTANTS:
Two types of constants those are:
a)primary constants
b)secondary constants
a)In primary constants they are integer,real,character constants.
b)In secondary constants they are array,pointer,structure,union,enum etc.
VARIABLES:
a variable is a dataname that may be used to store a data value.unlike constants that
remain unchanged during the execution of a program,a variable may take different values at different times during execution.
Rules for constructing variables:
1. they must begin with a letter.some systems permit underscore as the first character.
2.ANSI standard recognizes alenght of 31 characters.however,the lenght should not be normally
more than eight characters,since only the first eight charaters are treated as significant by
many compilers.
3.uppercase and lower case are significant.that is,the variable total is not the same as total or TOTAL.
4.the variable name should not be keyword.
5.white space is not allowed.
example: int a=10;//int is a datatype,a is a variable in which '10' value is stored.
KEYWORDS:
keywords are the words whose meaning has already been explained to the compiler.
this cannot be used as variable names because if we do so we are trying to assign a new meaning to the keyword.
some of the keywords are
auto double if static
break else int struct
case enum long switch
char extern near typedef etc
Popular Posts
-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE>Using JavaServer Pages...
-
Please do this exercise at the command line instead of using NetBeans. This is to learn the concept of classpath without the help of NetBean...
-
1 Introducing the .NET Framework with C# The .NET Framework is such a comprehensive platform that it can be a little difficult to descr...
-
Working With Integers The process of creating variable called "Declaring" To Declare (=create) Integer variable simply write: Dim ...
-
INTRODUCTION TO 'C': C is a programming language developed at AT & T's Bell laboratories of USA in 1972.it was designed by d...
-
STRINGS: The way a group of integers can be stored in an integer array, similarly a group of characters can be stored in a character array. ...
-
More About Ascii How can I know what is the Ascii value of a specific character? Use the Asc command. For example, the following line: Print...
-
Using functions we can structure our programs in a more modular way, accessing all the potential that structured programming can offer to us...
-
4.5 Using FCL Documentation for Types Using the SDK documentation for a given type will likely be a daily or even hourly event when ...
-
Microsoft SQL Server SQL Server is one of the most popular and advanced database systems currently available. SQL Server is provided by Micr...
No comments:
Post a Comment