SYMBOLIC CONSTANTS OR MACRO:
In this #define is a macro used for a constant value to be assigned in the program.
for example: pi its value is being fixed as 3.14 so
we can assign:
ex: #define pi 3.14
Rules for symbolic constants:
1.symbolic names have the same form as variable names.these are written in capitals to differ from ordinary variables.
2.No blank space between the pound sign '#' and the word define is permitted.
3.'#' must be the first character in the line.
4.A blank space is required between #define and symbolic name and between the symbolic name and the constant.
5.#define statements must not end with a semicolon.
6.after definition,the symbolic name should not be assigned any other value within the program by using an assignment statement.For ex: STRENGTH=200;is illegal.
7.symbolic names are NOT declared for data types .its data types depends on the type of constant.
Popular Posts
-
The SQL DISTINCT clause is used together with the SQL SELECT keyword, to return a dataset with unique entries for certain database table col...
-
SQL is short for Structured Query Language and is a widely used database language, providing means of data manipulation (store, retrieve, up...
-
Data Access with Server Explorer Visual Basic allows us to work with databases in two ways, visually and code. In Visual Basic, Server Explo...
-
A program is usually not limited to a linear sequence of instructions. During its process it may bifurcate, repeat code or take decisions. F...
-
Arguments passed by value and by reference. Until now, in all the functions we have seen, the arguments passed to the functions have been pa...
-
In this lesson we will learn about the various tags available in JSP with suitable examples. In JSP tags can be devided into 4 different typ...
-
What Is Visual Basic and Why do I need it? Visual Basic is Easy to learn Programming language. With Visual Basic you can develop Windows bas...
-
Introduction: In this exercise, you will exercise the concept object creation using new keyword. We will learn how you are going to create ...
-
Loops For Loop The For loop is the most popular loop. For loops enable us to execute a series of expressions multiple numbers of times. The ...
-
Accessing the Standard CGI Variables: To build the successful web application, you often need to know a lot about the environment in which ...
No comments:
Post a Comment