EmbLogic's Blog

issue in printf

Can any one tell me how printf is executing….

One Response to issue in printf

  1. Neeraj says:

    lets takes an example…….
    i = 10;
    printf(“%d%d%d”,i,i++,++i);

    pf starts execution process from right to left in case of format species but it executes from left to right in case of format specifier…….by giving an highest priority to i++ then ++i…..& then to i………so o/p is 12 10 12……before execution compiler print the updated value of i i.e 12…….

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>