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.
`#defines` are preprocessor commands. When the code is compiled, IX(i,j) is replaced with its definition everywhere it occurs. You can think of it as a copy-paste operation. Because this happens while the code is being compiled, IX(i,j) returns no type. This lack of type safety is both a feature and a drawback, use it carefully.