Understanding make

Found this nice article on make at IBM DeveloperWorks – you can read it here.

Also refer this link.

Rule:

target: dependencies
<tab>command

That’s the basic form, the first target is the default target.

Invoking “make -p” prints the internal macros for that make. This time though, I’m not going to try and make notes .. the IBM link is rather good for that.

Interview question, this?

Saw this on a message board I have started frequenting:

hi

j=1;cout<<j++<<endl<<j<<endl<<++j ;
the following code segment gives 233 as against expected 123. Can somebody explain why.

bye

Firstly, ghastly code! I wouldn’t like to hire someone who writes that!

Anyway, the C++ standard states that you cannot modify an object more than once between sequence points – the behaviour is unspecified and compiler dependent.