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

  • SEARCH
  • Home
  • 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 8510737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:47:11+00:00 2026-06-11T03:47:11+00:00

Possible Duplicate: C program without header I have been studying C for a long

  • 0

Possible Duplicate:
C program without header

I have been studying C for a long time . but one thing that bothering me is that , today I made a C program and forget to include the stdio.h and conio.h header files I saved the file as kc.c ? when I compiled and run this .c file the output was as I was expecting to be.

but how can a C program could run without using the standard header file?

or I am not aware with the concepts that I am missing hear?

EDIT: the program

int main()
{
  int i=12,j=34;
  int *pa=&i,*pb=&j;
  printf("the value of i and j is %d %d respectively ",*pa,*pb);
  getch();
  return 0;
}

because I have used the printf() function of STDIO.H header here ,but without including it how can It got compiled and run successfully?

  • 1 1 Answer
  • 0 Views
  • 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-06-11T03:47:13+00:00Added an answer on June 11, 2026 at 3:47 am

    The compiler is allowed to make things work, but is under no obligation to do so.

    You are supposed to declare all variable argument list functions before using them; not declaring printf() properly leads to undefined behaviour (and one valid undefined behaviour is to work as expected).

    You should be getting warnings about the undeclared functions if you compile in C99 mode (but Turbo C probably doesn’t have a C99 mode).


    Nit-picking:

    [H]ow can a C program could run without using the standard header file?

    All programs run without using any headers whatsoever. However, most programs are compiled using the standard headers to declare the standard functions, and the better programs ensure that all functions are declared before they are used (or are defined as static functions before they are used).

    C99 requires this, though many compilers will allow errant programs to compile. However, the compilation should produce a diagnostic; the diagnostic may or may not lead to the compilation failing. In practice, it usually doesn’t cause the compilation to fail, but it could and with some compilers (GCC, for example) you can force the compiler’s hand (e.g. with GCC’s -Werror=missing-prototypes -Werror=old-style-definition options).

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

Sidebar

Related Questions

Possible Duplicate: Is stl vector concurrent read thread-safe? I have a multi-threaded program that
Possible Duplicate: How to create pdf files on android I have a program that
Possible Duplicate: Sleep Less Than One Millisecond How can I make a program sleep
Possible Duplicate: Platform independent paths in Java I make a program but it save
Possible Duplicate: Linking 32-bit library to 64-bit program One of the libraries a program
Possible Duplicate: IOS: one account two iOS developer program excuse me if it's not
Possible Duplicate: Objective-C style formatter I have wrote a program and wonder if there
Possible Duplicate: How was the first compiler written? This question has always been bothering
Possible Duplicate: C dynamically growing array I have a program and I need to
Possible Duplicate: Test iOS app on device without apple developer program or jailbreak Is

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.