I m getting only "This is". as output.
How ????
Code:printf("This is \x0x65 C \x0x66");
I m getting only "This is". as output.
How ????
Code:printf("This is \x0x65 C \x0x66");
What did you expect to get? Note that '\x0' is 0, so you are effectively terminating the string at that point.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
If you want to show hex character 0x65, then you should use \x065. As it stands, character constants are malformed. The compiler doesn't detect it, as it is technically a valid string. In $l4xklynx post, it turns to a multi-character constant, and it is probably undefined behaviour exactly what it prints in this case.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.