Your program will give the compilation error because you escaped `"` by 
putting \".

If you remove the `"` escape then it works fine. 

C has fixed set of escape character which it understand and if it is unable 
to understand then it remove the escape character(\) and keep the remaining 
part.

In your case : 
printf("\%\d",12); --> printf("%d\",12);

--------------------------------------------------------------
Valid Escape Sequence.

   - \a - Bell(beep)
   - \b - Backspace
   - \f - Formfeed
   - \n - New line
   - \r - Carriage Return
   - \t - Horizontal Tab
   - \\ - Backslash
   - \' - Single Quotation Mark
   - \" - Double Quatation Mark
   - \ooo - Octal Representation <http://en.wikipedia.org/wiki/Octal>
   - \xdd - Hexadecimal Representaion<http://en.wikipedia.org/wiki/Hexadecimal>

---------------------------------------------------------------
On Saturday, 18 August 2012 00:42:36 UTC+5:30, maddy wrote:
>
> #include<stdio.h>
>
> main()
>
> {
>
> printf
>
> (
>
> "\%\d\
>
> "
>
> ,
>
> 12
>
> )
>
> ;
>
> printf
>
> (
>
> "\%\
>
> d\
>
> "
>
> ,
>
> 12
>
> )
>
> ;
>
>
>
> }
>
> -- 
> Regards,
> SHUBHAM SANDEEP
> IT 3rd yr.
> NIT ALD.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/5Yo09vkgHqkJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to