Static

What does this command exactly do

cc -static example.c

It depends on the compiler.

I believe in this case you will get a statically linked file - all of the external library routines will be copied into the exe file, instead of being loaded at runtime.

So WHat do i do to make the compliation more dynamic.
How can i Compress an exe fie

If you tell us what you are trying to do, we can give a better answer.
By default most compilers link dynamically.

I want to compress my exe files.
Is there a way to do this

After binary is formed you can compress by using

srtip 'binary'

but , i think the thread discussion started with different purpose
and it is going in different direction.

Hmm. If you compile static images ( -static) the resulting file is huge compared to compiling the default way - dynamically linked.

The only time you would want to compile statically is the case where the libraries your code needs will not exist on the machine the code needs to run on. Static linking 'parks' the library modules in your exe. Making it very large.