Friday, July 31, 2009

How can we print a string(eg"College") on the screen in C without using any semi colon.?

WE have to write the program code to display the string "College" on the output screen without making the use of any semi colon in the code.PLZ HLP

How can we print a string(eg"College") on the screen in C without using any semi colon.?
put it in an if.





like


main()


{


if(printf("College"))


{


;


}


}


this should work
Reply:That, or you can use inline ASM to call the "printf" function:





__asm


{


push [edx], DWORD PTR "College"


call printf


}





I believe. It's been a while since I've implemented inline ASM (did it with my last game engine).


No comments:

Post a Comment