Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Syntax

hello world syntax

  • Please log in to reply
7 replies to this topic

#1 Sionofdarkness

Sionofdarkness

    CC Addict

  • Just Joined
  • PipPipPipPipPip
  • 370 posts

Posted 21 July 2006 - 09:49 AM

I'm just starting out learning programming, and I'm trying to learn a little about each language. The syntax of C is really weird, can someone explain what all of it means? Like for this:

#include < stdio.h>

void main()
{
printf("\nHello World\n");
}

What does all of that mean, and what is it's purpose in the program?
  • 0

#2 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 21 July 2006 - 02:11 PM


#include < stdio.h > // this line tells the preprocessor to include the header file that will tell your program how to handle input/output



void main()  //this is the start of function main.  It is where processing in every program starts

{

  printf("\nHello World\n");  //This uses the output function (from stdio.h) to go to the next line, print "Hello World", then go to the next line

}

  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/


#3 Guest_NeedHelp_*

Guest_NeedHelp_*
  • Guest

Posted 22 July 2006 - 11:44 AM

And I thought I needed help!
  • 0

#4 dirkfirst

dirkfirst

    CC Addict

  • Just Joined
  • PipPipPipPipPip
  • 351 posts

Posted 22 July 2006 - 02:19 PM

And I thought I needed help!


lol. sionofdarkness do you not have any books or using any tutorials?
  • 0

#5 TkTech

TkTech

    The Crazy One

  • Retired Mod
  • PipPipPipPipPipPipPip
  • 1144 posts
  • Location:Ottawa, Ontario

Posted 22 July 2006 - 05:21 PM

dirkfirst, dont laugh at someone who is trying to learn.
Sionofdarkness, there are many books at your local library you can read to learn from the basics c and cpp. Or, search online for some tutorials, although a book is probably better.
  • 0
Helpful CODECALL Links: Join Us, Guidelines, FAQ, Post a Tutorial

#6 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 23 July 2006 - 06:12 AM

Following up on that: I recommend downloading Thinking in C++
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/


#7 Guest_Jordan_*

Guest_Jordan_*
  • Guest

Posted 23 July 2006 - 06:55 AM

dirkfirst, dont laugh at someone who is trying to learn.
Sionofdarkness, there are many books at your local library you can read to learn from the basics c and cpp. Or, search online for some tutorials, although a book is probably better.


Anyone trying to learn should not be laughed at dirkfirst. I'm sure you were learning once and had similar questions.
  • 0

#8 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 23 July 2006 - 07:23 AM

Also, when learning it is very easy to not know what concepts need to be worried about first. There's a lot of jargon in programming, and it can be very hard to know where to start in the learning process. Some things are easily answered on Google or Wikipedia, but with the many layers of interdependence in concepts, it can be hard to know what's what.
  • 1

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/






Also tagged with one or more of these keywords: hello world, syntax

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download