hello Can anybody tell me how to Write a C program to print "Hello World" with out using ';'

Have you tried searching the forum? How about the web? It's not like this question isn't asked on a regular basis.

What is C89?

K&R C refers to the very old C which existed before ANSI / ISO standardised the language.

C89 refers to the first ANSI standard (which happened in 1989, hence the name). A year later, ISO adopted the same specification. Over the next few years, there were some bug fixes wrapped up in what are called Technical Corrigendum's

C99 refers to the second ANSI/ISO standard (from 1999). This added some new features to the language and extended the library somewhat. Whilst almost every compiler out there (except some really old fossils, and the occasional toy pretending to be a compiler) will handle C89 happily, there are relatively few compilers which fully support C99.

For completeness, there is also C++98 as well.

#include<stdio.h>
void main()
{
if(printf("hello world")){}
}

Like I said, undefined behaviour.

y is it an undefines behaviour!!!can u be a bit more specific.

>can u be a bit more specific.

void main()

main is required to return int. If your implementation supports (and documents that it supports) void main, you only have implementation-defined behavior in that specific case. However, you didn't tell us what compiler to compile this with, and on a compiler that doesn't explicitly support void main, it's undefined behavior.

why the f would anyone think this is a reasonable question for a programming class?

no wonder so many people come out of CSC 101 or whatever hating programming, and not knowing how to do a damn thing.

>why the f would anyone think this is a reasonable question for a programming class?
I've concluded that people who don't know anything substantial use trivia as a replacement for expertise. Teachers have an uncanny tendency to fit that description. Some forum goers do as well, but in a different way. For example, people who actually help solve problems here have at least some measure of my respect, even if they're wrong. It's much more difficult to learn how to program than it is to regurgitate what you read in a book. But people who focus only on bitching about stuff like void main, fflush(stdin), goto, and bracing styles strike me as posers.

commented: Well said. +7

hey i bitched about gotos.

i'll do it again.

>hey i bitched about gotos.
Getting defensive because you fit the description more closely than you'd like? ;)

speaking of pedantry, you spelled "poseur" wrong.

>speaking of pedantry, you spelled "poseur" wrong.
No, actually I didn't. Both are equally acceptable. If you're going to be pedantic, at least be correct.

o rly?

well, let's see now, shall we?

here's "poseur", which I say is the correct one in the context you used

po·seur [poh-zur; Fr. paw-zɶr]
–noun, plural -seurs [-zurz; Fr. -zɶr]
a person who attempts to impress others by assuming or affecting a manner, degree of elegance, sentiment, etc., other than his or her true one.
Based on the Random House Unabridged Dictionary, © Random House, Inc. 2006.

po·seur (pō-zɶr', pō'zər)
n. One who affects a particular attribute, attitude, or identity to impress or influence others.
The American Heritage® Dictionary of the English Language, Fourth Edition
Copyright © 2006 by Houghton Mifflin Company.

poseur
"one who practices affected attitudes," 1872, from Fr. poseur. The word is Eng. poser in Fr. garb, and thus could itself be considered an affectation.
Online Etymology Dictionary, © 2001 Douglas Harper

poseur
noun
a person who habitually pretends to be something he is not
WordNet® 3.0, © 2006 by Princeton University.

Now, lets look at "poser", which you say is -- somehow -- also correct.

pos·er1 /ˈpoʊzər/
–noun
a person who poses.
pos·er2 /ˈpoʊzər/
–noun
a question or problem that is puzzling or confusing.
Based on the Random House Unabridged Dictionary, © Random House, Inc. 2006.

pos·er 1 (pō'zər)
n. One who poses.
pos·er 2 (pō'zər)
n. A baffling question or problem.
The American Heritage® Dictionary of the English Language, Fourth Edition
Copyright © 2006 by Houghton Mifflin Company.

So now are you suggesting that pedantic wannabe intellectual snobs are analogous to fashion models? or, perhaps, a "baffling question" ?

or maybe you can tell me, how does it feel to have been so wrong, so many times, in the space of just a few recent threads?

I can play that game too:

pos·er 1 (pō'zər)
n.

1. One who poses.
2. A poseur.

The American Heritage® Dictionary of the English Language, Fourth Edition
Copyright © 2006 by Houghton Mifflin Company.

I find it humorous that we're both quoting the same dictionary, yet for some odd reason you neglected to include the very definition that refutes your claim. It seems that not only are you stubborn about being wrong, you're an unethical debater as well.

circular definition

a "poser" means one thing, except when it means "poseur" which is the definition you want.

look here, dadnabbit. i KNOW about "poseurs" ... i'm an expert in the art.

>i KNOW about "poseurs" ... i'm an expert in the art.
Clearly.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.