answersLogoWhite

0

Actually macro and function are used for diff purposes.A macro replaces its expression code phisically in the code at the time of preprocessing.But in case of function the control goes to the function while executing the code.
So when the code is small then it is better to use macro.But when code is large then function should be used.

If you could get any help from the answer then plz increase my trust point.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

Why you use ctype.h in c language?

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


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

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


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

They do exist in C and C++.


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.


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


What are the disadvantages of using c?

There is basically no disadvantage of using a language like C. It depends on the programmer how he uses his skills.


Most c plus plus programmers use uppercase letters for variable names true or false?

False. Most C++ programmers use uppercase for macros (precompiler definitions), making them less likely to be confused with actual variables, constants or functions in the C++ source code. Macros are not actually part of the C++ language because the compiler never sees them, but they allow the precompiler to perform preprocessing tasks that would be difficult or impossible to accomplish with C++ code alone.


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.


Will openoffice crash with macros?

The honest answer is: "OpenOffice.org is software and therefore can crash as any software." However, the more interesting question is does OpenOffice.org support macros? The answer is: Yes and No! OpenOffice.org does support its own macro language. However the standard edition (as of release 2.3) does not support Visual Basic Macros, as used in Microsoft Office. There are editions of OpenOffice, that support VBA macros.


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.


What arethe advantages and disadvantages of aflowchart IN c language?

Nope, as flowcharts aren't part of C-language. Nonetheless, you can implement algorithms specified by flowcharts in C, but that might lead to unstructured code (also known as 'spaghetti-code'), which is outdated by forty years... Try using stuctograms instead.


Why c language has name c why not a?

C-language was derived from B-language.