CrazyEngineers
  • vamsi_51
    vamsi_51

    MemberNov 30, 2006

    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......................
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • ish_nalini

    MemberDec 3, 2006

    hey i think so it must be: %%%%%%%%%%%


    reason : printf prints as it is given inside the " "
    Are you sure? This action cannot be undone.
    Cancel
  • pad

    MemberDec 11, 2006

    %%%%%

    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.
    Are you sure? This action cannot be undone.
    Cancel
  • ish_nalini

    MemberDec 13, 2006

    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.
    Excellent pad really thats a great Solution .. i hav not thinked about that ......Please keep posting these kind of brain killing posts
    Are you sure? This action cannot be undone.
    Cancel
  • Pranny

    MemberDec 13, 2006

    The output is %%%%%...

    cause has already been posted
    Are you sure? This action cannot be undone.
    Cancel
  • ish_nalini

    MemberJan 20, 2007

    Hello guys,
    I found the answer for this problem to be "%%%%%%"in Turbo C compiler...Any one to reason it??????
    Are you sure? This action cannot be undone.
    Cancel
  • pad

    MemberJan 24, 2007

    ish_nalini
    Hello guys,
    I found the answer for this problem to be "%%%%%%"in Turbo C compiler...Any one to reason it??????
    yes!

    specifications are not always implemented in products...
    find a true ANSI compliant version and try again
    Are you sure? This action cannot be undone.
    Cancel
  • DEP

    MemberFeb 27, 2007

    pad
    yes!

    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.
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register