473,563 Members | 2,667 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

reply the answer

Can we write a C programe with out a semicolon ? printing HELLOWORLD !

Jun 24 '07 #1
105 3186
guthena wrote:
Can we write a C programe with out a semicolon ? printing HELLOWORLD !
Yes.

--
Eric Sosman
es*****@acm-dot-org.invalid
Jun 24 '07 #2
Eric Sosman said:
guthena wrote:
>Can we write a C programe with out a semicolon ? printing HELLOWORLD
!

Yes.
I'm curious. I can see the print part easily enough, but how are you
going to handle the return statement? (Email reply welcome if you don't
want to spoil the OP's fun.)

--
Richard Heathfield <http://www.cpax.org.uk >
Email: -www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Jun 24 '07 #3
Richard Heathfield wrote:
Eric Sosman said:
>guthena wrote:
>>Can we write a C programe with out a semicolon ? printing HELLOWORLD
!

Yes.

I'm curious. I can see the print part easily enough, but how are you
going to handle the return statement? (Email reply welcome if you don't
want to spoil the OP's fun.)
There is no need for a return statement.
Jun 24 '07 #4
Harald van D?k said:
Richard Heathfield wrote:
>Eric Sosman said:
>>guthena wrote:
Can we write a C programe with out a semicolon ? printing
HELLOWORLD !

Yes.

I'm curious. I can see the print part easily enough, but how are you
going to handle the return statement? (Email reply welcome if you
don't want to spoil the OP's fun.)

There is no need for a return statement.
Oh. *That* kind of program. Count me out.

--
Richard Heathfield <http://www.cpax.org.uk >
Email: -www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Jun 24 '07 #5
Richard Heathfield wrote:
Harald van D?k said:
>Richard Heathfield wrote:
>>Eric Sosman said:
guthena wrote:
Can we write a C programe with out a semicolon ? printing
HELLOWORL D !

Yes.

I'm curious. I can see the print part easily enough, but how are you
going to handle the return statement? (Email reply welcome if you
don't want to spoil the OP's fun.)

There is no need for a return statement.

Oh. *That* kind of program. Count me out.
I'm not sure what you mean by "that" kind. You don't need a return statement
in a strictly conforming C90 program that prints "HELLOWORLD " and exits
successfully.

#include <stdio.h>
#include <stdlib.h>
int main(void) {
puts("HELLOWORL D");
exit(0);
}

Getting rid of the semicolons for the exit call can be done the same way as
for puts.
Jun 24 '07 #6

"Harald van D?k" <tr*****@gmail. comwrote in message
news:f5******** **@news5.zwoll1 .ov.home.nl...
Richard Heathfield wrote:
>Harald van D?k said:
>>Richard Heathfield wrote:
Eric Sosman said:
guthena wrote:
>Can we write a C programe with out a semicolon ? printing
>HELLOWOR LD !
>
Yes.

I'm curious. I can see the print part easily enough, but how are you
going to handle the return statement? (Email reply welcome if you
don't want to spoil the OP's fun.)

There is no need for a return statement.

Oh. *That* kind of program. Count me out.

I'm not sure what you mean by "that" kind. You don't need a return
statement
in a strictly conforming C90 program that prints "HELLOWORLD " and exits
successfully.

#include <stdio.h>
#include <stdlib.h>
int main(void) {
puts("HELLOWORL D");
exit(0);
}

Getting rid of the semicolons for the exit call can be done the same way
as
for puts.
For top notch credit see if you can return EXIT_FAILURE if the puts call
fails.

--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm

Jun 24 '07 #7
void main()
{
if(printf("Hell o World")){}
}

this is the simple way. and even u can assign the values without using
semi-colon. if() is the best to use among

Jun 24 '07 #8
sravan_reddy001 said:
void main()
{
if(printf("Hell o World")){}
}

this is the simple way.
Alas, it doesn't conform to the specification, which called for a C
program.

--
Richard Heathfield <http://www.cpax.org.uk >
Email: -www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Jun 24 '07 #9
Harald van D?k said:
Richard Heathfield wrote:
>Harald van D?k said:
<snip>
>>There is no need for a return statement.

Oh. *That* kind of program. Count me out.

I'm not sure what you mean by "that" kind. You don't need a return
statement in a strictly conforming C90 program that prints
"HELLOWORLD " and exits successfully.
Correction: *you* might not need a return statement there, but if I
can't have one there, I'm taking my ball home.

--
Richard Heathfield <http://www.cpax.org.uk >
Email: -www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Jun 24 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1654
by: Showcar | last post by:
Thank you for your interest in the Hendrick Motorsports Showcar Program. In an attempt to answer your questions more effectively and efficiently, we have developed this automatic response. If this reply does not satisfactorily answer your questions, we will gladly respond to you personally as soon as possible. · If you would like more...
1
1198
by: sorCrer | last post by:
Hi Juan, Thanks for the reply! Unfortunately your answer didn't help me. If I don't 'Import' the custom class then I can't call any of it's functions. This problem goes away if I compile the .vb file first, and import the namespace and class with an import directive! It's almost as if the framework can't see the /code directory the way...
4
1200
by: K.N.Ranjit | last post by:
Hi to all friends out there.I am presently working in TCS and I am supposed to do the work given to me in line cordinates using VB.net.But over here I face a problem (ie) I want my coordinate (0,0) to start in the lower-left corner of my form instead of the default upper-left corner of the form.If anyone could provide me the solution I would...
19
1692
by: wcfinvader | last post by:
I have known this girl forever every since 3rd grade we are both in 10th grade now and I feel like I am in love with her and I want to ask her out but I dont know if I should call her tonight or this weekend or if I should wait until Monday at school to ask her. (We dont have school Friday Parent techer confernce). I know she likes me but...
23
2010
by: novice | last post by:
I dint find a proper group to post this, so i'm asking this question. If you think this question is irrelevent then dont answer, but i expect good replies from experts. I wondor, how these guys who answer to complicated questions have mastered C. I'm a beginner in C, and wondor how to master C. Should i study theory, or start writing...
3
5401
by: Frank | last post by:
I am attempting to develop a solution where I handle bounced e-mails. I wish to field all bounced emails in a custom email account such a bounced@mycompany.com From the aricle at http://www.systemwebmail.com/faq/2.7.aspx, I gather I could use: mail.Headers.Add( "Reply-To", "alternate_email@mycompany.com" ); When I test this from a test...
0
1186
by: roberto | last post by:
Sorry, but posting a reply does no work (6 hours after the "successful" post the message is not shown)) so I decided to post it. This is a reply to a thread http://groups.google.pl/group/microsoft.public.dotnet.framework.webservices/browse_thread/thread/1de13b5ef20c837a/78006eaa8e840fd1#78006eaa8e840fd1 Web Service API is a minimal one,...
1
1658
by: Karon Davis | last post by:
Hi, can someone tell me if it's possible to send delivery status notifications (or NDRs) to the Reply-To address (specified in CDOSYS script) rather than the FROM address? thanks.
0
7580
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7882
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8103
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7634
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7945
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5481
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5208
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3634
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.