Question: When you see a line like:

```
#define IX(i,j) ((i)+(N+2)*(j))

```

is that equivalent to:

```
int IX(int i, int j) {

    return ((i)+(N+2)*(j));

}

```

How do you know the return type etc?

Answer: 
Macros never get seen by the compiler - the preprocessor replaces the text.

So, when you write:

```
result = IX(5, 3);
```

The compiler will see this:

```
result = ((5)+(N+2)*(3));
```

This can have impacts on behaviour, but it depends on your macro. In this case, not so much (there are also performance and debugging differences, but let's not worry about them here).

Had, for example, you defined your macro like this (note second use of *i* variable)

```
#define IX(i,j) ((i)+(i+2)*(j))
```

And called it like so:

```
result = IX(++i, j);
```

Then the macro and function would have different behaviour.
All the answers are correct.

Since macros are handled by the preprocessor before the compiler translates the code to machine instructions they can have the interesting side effects others have mentioned.

I don't entirely agree with the statement that macros reduce code understandability. I think if they are used cautiously, intelligently, and are provably correct they can lead to more understandable (dare I say it?) self-documenting code.

Example:

```
#define MAX(N1,N2) ((N1) > (N2) ? (N1) : N2))
biggest = MAX(temperatureOne, temperatureTwo);

```

Yes, I know that MAX(x++, y) would have undesirable side effects but that's where the intelligent use comes in.