answersLogoWhite

0

In C macros are a piece of code that is replaced by its value whenever it called from.

Syntax for defining a macro is :

# define Macro_Name Value

As:

# include<stdio.h>

# define three 3

int main(){

printf("%d", three);

return 0;

}

output: 3.

In above example three is a macro and its value is 3.

The place for defining macros are same as including a header file in a program.

User Avatar

Wiki User

9y ago

What else can I help you with?

Related Questions

What to Do if Macros does not exist in C and C plus plus?

They do exist in C and C++.


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.


What does the hashtag mean in programming?

In programming, specifically in C and C++, the hashtag (#) is used to include files into the main program and to create macros.


Why you use ctype.h in c language?

it contains the information used by character classification and character conversion macros


Macro in C Language?

Macros are very common and often used in C programming to declare constants, such as strings, addresses, or any other values such as maximum number of elements in an array, and so on. For those who are not familiar with them, Macros are declared by the #define keyword. Macros are also used to define some basic functionality given a set of 1 or more typeless parameters, similarly to an inline function.


Why you use macros?

Macros are used to automate repetative tasks.


Why do you use macros?

Macros are used to automate repetative tasks.


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.


In C programming language how to find weather given character is capital or small?

Macros isupper and islower from ctype.h will help you.


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.


How do you run VB in Microsoft Excel?

You can do it by creating macros and then editing the macros. The macros or set of code can be applied to a button. It will depend on the version of Excel you have, but you can usually start creating macros or writing code through the Tools menu.


Do word processor support macros?

Some word processor support macros, some does not.