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: 
No, it's not equivalent. A `#define` is a macro, a kind of source code string substitution capability.

Your example of an `IX()` function has many attributes relevant to executing code, like having instructions compiled once, having an address, and requiring integer parameters.

The macro takes parameters, but it has no type handling, until the arithmetic is attempted. Even then, any parameters which the preprocessor can evaluate could do something useful. Or it could do something unexpected.

As a handy rule of thumb, the more that macros are used, the less understandable and maintainable the code tends to be.
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.