answersLogoWhite

0


Best Answer

Macros are processed at preprocessing time where as constant variables are processed at complie time. Macros doesnot have any scope but constant variables has scope. Macros doesnot have the type checking where as constant variables have type checking.

User Avatar

Wiki User

βˆ™ 11y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

βˆ™ 13y ago

program veriable is a simple veriable of any program its value can be change or modify in future but if we have any constant in our program we cannot change its value we can only use it in increment & decrement and contatant value(fixed value)

e.g : if we have two variable a and b a is constant and b is simple variable

we can use like that:

constant int a=10;

int b=20;

we can change b's value like b=30;

Not like that a=20; its will give error in you program

we can increment or decrement it like a++;a--;

not have other difference b/w them

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between macros and constant variable?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What are the differences between a global variable and macro?

A global variable is a place of data storage which multiple modules of application (sometimes all modules) can access to read and modify the variable's content. A macro is something altogether different. A macro is a set of instructions, typically used to save keystrokes when coding, and to maintain code readability. While macros can reference, declare or use variables (including global variables), macros and variables are quite different and cannot be compared.


What is the expansion of conio.h?

EXPANSION OF CONIO.HConio.h library in C implies a console version which encapsulates the common I/O functions.Console input/output header


What is the difference between a macro and typedef?

A Macro is a preprocessor directive means that before compilation the macros are replaced. Where as typedef is defining a new data type which is same as the existing data type. Syntax: typedef Existing datatype New datatype For example typedef int NUMBER; Here NUMBER (New datatype)is defined as a data type which contains the properties same as int(Existing datatype). You can declare a variable of int as NUMBER a; is same as int a; similarly typedef int* NUMBERPOINTER; NUMBERPOINTER a; Here a is a pointer of integer type.


What is difference between macro processor and macro assembler?

A macro processor processes macros. So what do you think a macro call does, play the flute. The answer is in the question and that begs the question of are you suited to computer programming specifically and an education in general. You are showing a marked reluctance to thinking.


What are the uses of macros?

With macros, you can perform long or boring tasks just by a single click or keystroke combination. Also, you would not need to repeat the same action over and over again.

Related questions

What is the difference between macros and wizard?

a wizard inserts fields and a macros is something like a hyperlink that when you click on it, it automatically takes you to another page!


What is the difference between pause recording and stop recording option in macros submenu in windows word 2010?

no difference,..


What is the difference between an enumeration and macro?

In enumeration, values can be generated for us but in macros we have to give value for every macro template and type checking can be done in enums.


Can you leave blank lines between macros in a macro group?

No, because Access will interpret a blank line as no further action and stop executing the macros.


What is the difference between macros in Microsoft Word and Microsoft Excel?

Not much, except that the macros would be written to perform different tasks, because Word (word processor) and Excel (spreadsheet) have different functions. Both are written by the user to perform a specific task, but since each application handles most tasks differently, the macros would need to be designed for the tasks relevant to the specific application.


How can called function determine number of arguments that have been passed to it in C language?

use the variable length argument - va_arg va_list ca_start and va_end macros


Why do you use macros?

Macros are used to automate repetative tasks.


Why you use macros?

Macros are used to automate repetative tasks.


What are the differences between a global variable and macro?

A global variable is a place of data storage which multiple modules of application (sometimes all modules) can access to read and modify the variable's content. A macro is something altogether different. A macro is a set of instructions, typically used to save keystrokes when coding, and to maintain code readability. While macros can reference, declare or use variables (including global variables), macros and variables are quite different and cannot be compared.


How you run the macros into Microsoft Excel?

You can open the Macros section and run macros from there. The quickest way to do that is press Alt - F8. You can also run macros by clicking on buttons or other objects that you have assigned them to.


How do you get Macros to work on newer versions of Excel?

There can be many reasons why your macros are not working. Check security settings to ensure your version of Excel has macros enabled. Many times, the default installation disables the ability to use macros. Ensure you accept security certificates for the author of the macros.


What is the expansion of conio.h?

EXPANSION OF CONIO.HConio.h library in C implies a console version which encapsulates the common I/O functions.Console input/output header