mockers
Would you like to react to this message? Create an account in a few clicks or log in to continue.

print ur name without printing in main...

4 posters

Go down

print ur name without printing in main... Empty print ur name without printing in main...

Post  $corpion Mon Feb 02, 2009 1:10 am

without using ur name in main..print ur name.....
is there ne preprocessor funda in this???


don give solution as
#define main() main(){puts("name");}
$corpion
$corpion

Posts : 25
Join date : 2009-01-30
Age : 37

Back to top Go down

print ur name without printing in main... Empty @scorpion

Post  ballu Mon Feb 02, 2009 2:08 am

use of constrcutors would do??
ballu
ballu

Posts : 58
Join date : 2009-02-01

Back to top Go down

print ur name without printing in main... Empty Re: print ur name without printing in main...

Post  mnnit.rahul Mon Feb 02, 2009 2:52 am

1)we can also rewrite our own printf which when passed with no argument print answer as name



2)also there exist a function at_exit which is called after main so we can print name there

3)use desstructor as used by rajeev in 1 question at cc forum

mnnit.rahul

Posts : 51
Join date : 2009-02-01

Back to top Go down

print ur name without printing in main... Empty Re: print ur name without printing in main...

Post  Admin Mon Feb 02, 2009 3:40 am

ACTUALLY THIS QUESTION WAS ASKED TO KHATPALANI OF TRONIX..
HE SAID KI SIR TOLD DAT ITS RELATED TO SOME PREPROCESSOR...DAT IS MEANT FOR DOIN THINGS LIKE THIS..
NEONE HAVIN IDEA REGARDING THIS???

Admin
Admin

Posts : 47
Join date : 2009-01-29

https://mockers.forumotion.com

Back to top Go down

print ur name without printing in main... Empty Re: print ur name without printing in main...

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum