Monday, September 26, 2011

Different printf Statement

consider this code :

                                void main()
                                {
                                   int a=10,b=20;
                                   printf("%d...%d");
                                 }
o/p :
             10...20
the values will be printed even its variables are not mentioned. format specifier is necessary for that statement.


    




HOW TO PRINT THIS - printf("hello")

this can be done by the following code :

                                        printf("printf(\"hello\")");

o/p :

printf("hello")