Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7645157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:52:09+00:00 2026-05-31T09:52:09+00:00

Looking into learning C. As I understand it when I say #include <stdio.h> it

  • 0

Looking into learning C. As I understand it when I say #include <stdio.h> it grabs stdio.h from the default location…usually a directory inside your working directory called include. How do I actually get the file stdio.h? Do I need to download a bunch of .h files and move them from project to project inside the include directory? I did the following in a test.c file. I then ran make test and it outputted a binary. When I ran ./test I did not see hello print onto my screen. I thought I wasn’t seeing output maybe because it doesn’t find the stdio.h library. But then again if I remove the greater than or less than signs in stdio the compiler gives me an error. Any ideas?

I’m on a Mac running this from the command line. I am using: GNU Make 3.81. This program built for i386-apple-darwin10.0

#include <stdio.h>

main()
{
  printf("hello");
}

Edit: I have updated my code to include a datatype for the main function and to return 0. I still get the same result…compiles without error and when I run the file ./test it doesn’t print anything on screen.

#include <stdio.h>

int main()
{
  printf("hello");
  return 0;
}

Update:
If I add a \n inside of the printf it works! so this will work:

#include <stdio.h>

    int main()
    {
      printf("hello\n");
      return 0;
    }
  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T09:52:10+00:00Added an answer on May 31, 2026 at 9:52 am

    Your code should have preferably

     printf("hello\n");
    

    or

     puts("hello");
    

    If you want to know where does the standard header file <stdio.h> comes from, you could run your compiler with appropriate flags. If it is gcc, try compiling with

    gcc -H -v -Wall hello.c -o hello
    

    Pedantically, a standard header file is even not required to exist as a file; the standard permits an implementation which would process the #include <stdio.h> without accessing the file system (but e.g. by retrieving internal resources inside the compiler, or from a database…). Few compilers behave that way, most really access something in the file system.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am looking into creating a custom members login system (for learning) and I
I'm in the process of learning WPF and am currently looking into application commands
I am just started out learning Python and also started looking into Django a
I'm looking into learning OpenGL ES for making a little graphics engine in Android
I'm looking into learning C basics and syntax before beginning Systems Programming next month.
Just learning php and looking into someone else's code. I'm not sure what is
I am looking to get into learning how to use the html5 canvas to
I'm looking into learning the basics of OpenGL only with v.3.0 methods onwards. I've
I'm learning ObjectiveC and ran into a problem relating to introspection. Basically, I'm looping
Looking into selector performance between $('#ID1, #ID2, #ID3') vs $('1X CLASS'). Which is faster?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.