Question: I know a handler is bound to the thread's message queue in which it is created, but what if i create a handler in a service and posting a runnable declared in activity to which my service is bound.
For example:
In service:-

```
Handler handler=new Handler();
handler.post(Mainactivity.runnable);

In activity inside oncreate method:-

Runnable runnable=new Runnable(){
    public void run{
       //some code here
    }
};

```

Can someone please explain me what's happening here?

Answer: 
Like it was told to you in a comment, macros aren't functions. They are a token substitution mechanism. So you do not return from them as you would a function.

```
#define round(N) (((N) >=0)? (int)((N)+0.5) : (int)((N)-0.5))

```

The changes I made include:

1. Making it an expression. This involves replacing the curly braces with parentheses. This is so you could use the macro almost anywhere you could use a function. Had I left the curly braces it would have been a compound statement.
2. Wrapping the parameter N in parentheses as well, to make sure operator precedence doesn't come back and bite us.
You don't need the `return` keyword, it's not a function. Get rid of it.

Quoting `C11`, chapter §6.8.6.4

> 
> A `return` statement terminates execution of the **current function and returns control to
>  its caller.** [...]
> 
> 
> 

which is **not** the purpose of your MACRO definition. Inclusion of `return` keyword is unwanted and invalid syntax there.

What you probably want is a syntax like

```
  (N >=0)? (int)(N+0.5) : (int)(N-0.5)

```

or, something better

```
 ( (N) >=0)? (int)((N)+0.5) : (int)((N)-0.5)

```

without the `return` and maybe the trailing `;` also.