10 Replies - 19476 Views - Last Post: 22 February 2008 - 04:02 AM
#1
to print a string "hello" without using semicolon
Posted 16 February 2008 - 10:07 PM
plz help
Replies To: to print a string "hello" without using semicolon
#2
Re: to print a string "hello" without using semicolon
Posted 16 February 2008 - 10:38 PM
Your topic has more text than your actual post. I would think that the topic would highlight the material of your post, not offer the main course.
Can you explain in more detail please?
Can you explain in more detail please?
#3
Re: to print a string "hello" without using semicolon
Posted 16 February 2008 - 10:59 PM
no2pencil, on 16 Feb, 2008 - 10:38 PM, said:
Your topic has more text than your actual post. I would think that the topic would highlight the material of your post, not offer the main course.
Can you explain in more detail please?
Can you explain in more detail please?
i want to write a program that prints "hello" on screen without using semicolon(
#4
Re: to print a string "hello" without using semicolon
Posted 16 February 2008 - 11:01 PM
If you want to do that in C or C++ I don't think you wil succeed because they are not scripting languages.
Hope this helps.
Hope this helps.
This post has been edited by PennyBoki: 16 February 2008 - 11:16 PM
#5
Re: to print a string "hello" without using semicolon
Posted 16 February 2008 - 11:05 PM
Vvivek786, on 16 Feb, 2008 - 10:59 PM, said:
no2pencil, on 16 Feb, 2008 - 10:38 PM, said:
Your topic has more text than your actual post. I would think that the topic would highlight the material of your post, not offer the main course.
Can you explain in more detail please?
Can you explain in more detail please?
i want to write a program that prints "hello" on screen without using semicolon(
The semi-colon is required for the end of any line that issues a function or command in C. So you can't issue anything without one. I wouldn't think that this can be done.
#6
Re: to print a string "hello" without using semicolon
Posted 17 February 2008 - 02:05 AM
#7
Re: to print a string "hello" without using semicolon
Posted 17 February 2008 - 02:17 AM
AFAIK, I think this isn't possible, correct me if I'm wrong
#8
Re: to print a string "hello" without using semicolon
Posted 17 February 2008 - 02:37 AM
The more important question is WHY would you want to do this? ><
#9
Re: to print a string "hello" without using semicolon
Posted 18 February 2008 - 05:52 AM
#10
Re: to print a string "hello" without using semicolon
Posted 18 February 2008 - 06:35 AM
While not the prettiest of options, this sort of thing can be accomplished taking the printable string as a command line argument, and using a statement inside a control loop print, eliminating the need for a semi colon. An example is below.
http://answers.yahoo...11101631AAasFca
http://answers.yahoo...11101631AAasFca
#11
Re: to print a string "hello" without using semicolon
Posted 22 February 2008 - 04:02 AM
Page 1 of 1

New Topic/Question
Reply




MultiQuote




|