C problem
[FONT="]#include [/FONT]
[FONT="] main()[/FONT]
[FONT="] {[/FONT]
[FONT="] clrscr();[/FONT]
[FONT="] printf(“%%%%%%%%%%%”);[/FONT]
[FONT="] getch();[/FONT]
[FONT="] }[/FONT]
What is the Output ?
Give Reason also......................
[FONT="] main()[/FONT]
[FONT="] {[/FONT]
[FONT="] clrscr();[/FONT]
[FONT="] printf(“%%%%%%%%%%%”);[/FONT]
[FONT="] getch();[/FONT]
[FONT="] }[/FONT]
What is the Output ?
Give Reason also......................
Replies
-
ish_nalinihey i think so it must be: %%%%%%%%%%%
reason : printf prints as it is given inside the " " -
pad%%%%%
i.e. 5% as %% becomes % when used in printf as % is special here and is escaped. last % doesnt find a matching % so doesnt get printed. -
ish_nalini
Excellent pad really thats a great Solution .. i hav not thinked about that ......Please keep posting these kind of brain killing postspad%%%%%
i.e. 5% as %% becomes % when used in printf as % is special here and is escaped. last % doesnt find a matching % so doesnt get printed. -
PrannyThe output is %%%%%...
cause has already been posted -
ish_naliniHello guys,
I found the answer for this problem to be "%%%%%%"in Turbo C compiler...Any one to reason it?????? -
pad
yes!ish_naliniHello guys,
I found the answer for this problem to be "%%%%%%"in Turbo C compiler...Any one to reason it??????
specifications are not always implemented in products...
find a true ANSI compliant version and try again -
DEPpadyes!
specifications are not always implemented in products...
find a true ANSI compliant version and try again
hi pad,
dont have ANSI compiler. So how about this idea of mine. You tell what is the anwer in ANSI compiler and i will try figure out the reason.
You are reading an archived discussion.
Related Posts
Can anyone throw some light on how does recovery disc works coz if we have deleted data from our Computer then howz its possible to recover the same?
It means...
Well CEans time to get started. We'll have our Quantitative Analysis questions of the CAT - 2006 in this thread. Lets see whether the CEans find it easy or difficult...
Well CEans time for some english now. We'll have our English questions of the CAT - 2006 in this thread. It was said its difficult this time, may be. But...
Hello CEans!
Let us begin this edition of CE Bulletin with a short story about www.CrazyEngineers.com. CrazyEngineers came to life about an year ago on November 26, 2005 with a...
Hello CEans!
While browsing the net, I came across this article on Cnet News -
https://news.com.com/2100-1032_3-6133998.html
Yahoo is late, but better late than never. The best thing I liked about...