Hi,
Can any body tell me how to print "hello,worl d" with out using semicolon
Thanks in advance ..
Bye
Prashanth Badabagni
Nov 14 '05
42 9900
On Mon, 3 May 2004, Thomas Matthews wrote: Prashanth Badabagni wrote:
Hi, Can any body tell me how to print "hello,worl d" with out using semicolon Thanks in advance .. Bye Prashanth Badabagni Besides being a homework candidate question, what useful application does this suit?
During an interview it could be a useful way to see of the candidate has
been lurking on comp.lang.c for the passed year or at least read the
archives. 8^)
I've never concerned myself with this kind of issue in all my 30 years of programming.
Only 21 years but I agree. I do occasionally have to understand some
obfuscated code however. I don't write obfuscated code (at least not for
professional programming) but I have had to re-write obfuscated code.
-- Thomas Matthews
C++ newsgroup welcome message: http://www.slack.net/~shiva/welcome.txt C++ Faq: http://www.parashift.com/c++-faq-lite C Faq: http://www.eskimo.com/~scs/c-faq/top.html alt.comp.lang.l earn.c-c++ faq: http://www.raos.demon.uk/acllc-c++/faq.html Other sites: http://www.josuttis.com -- C++ STL Library book
--
Send e-mail to: darrell at cs dot toronto dot edu
Don't send e-mail to vi************@ whitehouse.gov
In article <Pi************ *************** ****@drj.pf>, da*****@NOMORES PAMcs.utoronto. ca.com (Darrell Grainger) wrote: On Mon, 2 May 2004, Prashanth Badabagni wrote:
Hi, Can any body tell me how to print "hello,worl d" with out using semicolon
Yes, you go to http://www.google.ca/grphp and search for "group:comp.lan g.c hello world no semicolon".
A very simple solution is to write a BASIC program and run it:
10 PRINT "hello,worl d"
20 END
Even simpler, use a word processor, type "hello,worl d", then use the
Print menu.
On Tue, 4 May 2004, Christian Bau wrote: In article <Pi************ *************** ****@drj.pf>, da*****@NOMORES PAMcs.utoronto. ca.com (Darrell Grainger) wrote:
On Mon, 2 May 2004, Prashanth Badabagni wrote:
Hi, Can any body tell me how to print "hello,worl d" with out using semicolon
Yes, you go to http://www.google.ca/grphp and search for "group:comp.lan g.c hello world no semicolon".
A very simple solution is to write a BASIC program and run it:
10 PRINT "hello,worl d" 20 END
Even simpler, use a word processor, type "hello,worl d", then use the Print menu.
But then it would be off-topic for comp.lang.c. 8^)
--
Send e-mail to: darrell at cs dot toronto dot edu
Don't send e-mail to vi************@ whitehouse.gov
Lew Pitcher <Le*********@td .com> scribbled the following: madhukar_bm wrote: b_*********@hot mail.com (Prashanth Badabagni) wrote in message news:<d1******* *************** ****@posting.go ogle.com>...Hi, Can any body tell me how to print "hello,worl d" with out using semicolon
#include<stdio. h>
Whilst this line, of itself, does not contain a semicolon, it's actions effectively insert many other lines (some of which /may/ contain semicolons) into the source code. This is line technically satisfies the OPs requirement, but operationally may not.
If all that is needed is for the actual C source file not to contain
semicolons, all we need to do is:
/* file: program.c */
#include <stdio.h>
int main(void) {
printf("Hello, world!\n");
return 0;
}
/* file: main.c */
#include "program.c"
And then compile main.c.
--
/-- Joona Palaste (pa*****@cc.hel sinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"It was, er, quite bookish."
- Horace Boothroyd b_*********@hot mail.com (Prashanth Badabagni) wrote in message news:<d1******* *************** ****@posting.go ogle.com>... Can any body tell me how to print "hello,worl d" with out using semicolon
These requirements are easily satisfied with a one-line C translation
unit:
#error "hello,worl d"
since they don't specify that "hello,worl d" (or "hello , wolrd", or
other variations thereof) be printed during program execution, or
indeed that there be a program (written by the user to satisfy the
assignment) at all.
--
Michael Wojcik mi************@ microfocus.com
An intense imaginative activity accompanied by a psychological and moral
passivity is bound eventually to result in a curbing of the growth to
maturity and in consequent artistic repetitiveness and stultification.
-- D. S. Savage mw*****@newsguy .com (Michael Wojcik) wrote in message news:<c7******* **@news2.newsgu y.com>... since they don't specify that "hello,worl d" (or "hello , wolrd", or other variations thereof) be printed during program execution, or indeed that there be a program (written by the user to satisfy the assignment) at all.
Since there is no requriement for even a program to be written:
(from the command line)
echo "hello, world"
In article <96************ **********@post ing.google.com> , re********@yaho o.com (red floyd) writes: Since there is no requriement for even a program to be written:
(from the command line) echo "hello, world"
Ah, but that's not topical on c.l.c, unlike my proposal. I'm treating
group topicality as an additional, externally-imposed requirement.
--
Michael Wojcik mi************@ microfocus.com b_*********@hot mail.com (Prashanth Badabagni) wrote: Can any body tell me how to print "hello,worl d" with out using semicolon
Here is a variation: write C program to print ";"
without using semicolon, digits, double quote, and single quote.
Assume ascii.
Yakov
Yakov Lerner <ji******@yahoo .com> scribbled the following: b_*********@hot mail.com (Prashanth Badabagni) wrote: Can any body tell me how to print "hello,worl d" with out using semicolon
Here is a variation: write C program to print ";" without using semicolon, digits, double quote, and single quote. Assume ascii.
Earlier, I wrote a program to print "Hello, world" without using literal
values (numbers, characters or strings) at all. It also assumed ASCII.
By combining this and various techniques presented in this thread your
problem can be solved.
--
/-- Joona Palaste (pa*****@cc.hel sinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"Show me a good mouser and I'll show you a cat with bad breath."
- Garfield
On Mon, 10 May 2004, Yakov Lerner wrote: b_*********@hot mail.com (Prashanth Badabagni) wrote: Can anybody tell me how to print "hello,worl d" without using semicolon
Here is a variation: write C program to print ";" without using semicolon, digits, double quote, and single quote. Assume ascii.
ASCII is off-topic in comp.lang.c. I think you meant to say,
"Do not assume ASCII."
#include <stdio.h>
#include <stdlib.h>
#define Z ((int)NULL)
#define P(x) printf(#x
#define L(x) #x
#define S L(| |)[!Z]
int f(int l,int i){if((i=l,!Z)& &l==Z&&P(%c%c%d \n),S,S,Z)&&f
(++i,i)){}else if(--l==Z&&P(\n))&&f (++i,i)){}else if(--l==Z
&&P(%c%c%d\n),S ,S,Z)&&f(++i,i) ){}else if(--l==Z&&P(%c/\n),S
)&&f(++i,i)){}e lse if(exit(Z),Z){} }int main(){if(f(Z,Z )){}}
-Arthur This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: ankursinha |
last post by:
Hi,
Is it possible to write a C program that prints "Hello World" on screen without
having a single semi-colon in the entire program?
The extra constraint here is that u r not allowed to use if,while,switch etc.
So far,i figured this could be done by insertint the printf statement in main
as shown:
int main(int argc=printf("Hello world")
|
by: Spidey |
last post by:
for(;0;)
printf("hello");
even the condition s wrong i get a hello printed on the screen
y s this happening
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| | |