Thread: need help with c

  1. #1
    Registered User
    Join Date
    Jan 2006
    Posts
    2

    need help with c

    I am a noob to C and i have made a helo world type program and when i run it it come up for a second then closes. i do have the renturn 0; in it. heres my code. it looks fine but it comes up for about a second. I am using dev c++ and hav ethe file saved as a .c.




    Code:
    #include
    <stdio.h>
    
    int main()
    {
      printf( "hello there!.\n" );
      getchar();
      return 0;
    }

  2. #2
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,005
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  3. #3
    Registered User
    Join Date
    Jan 2006
    Posts
    2
    how do i navigate to it in command promt

  4. #4
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,005
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

Popular pages Recent additions subscribe to a feed