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 85721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T22:08:02+00:00 2026-05-10T22:08:02+00:00

Session transcript: > type lookma.c int main() { printf("%s", "no stdio.h"); } > cl

  • 0

Session transcript:

> type lookma.c int main() {   printf("%s", "no stdio.h"); }  > cl lookma.c Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for 80x86 Copyright (C) Microsoft Corporation.  All rights reserved.  lookma.c Microsoft (R) Incremental Linker Version 8.00.50727.762 Copyright (C) Microsoft Corporation.  All rights reserved.  /out:lookma.exe lookma.obj  > lookma no stdio.h 
  • 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. 2026-05-10T22:08:02+00:00Added an answer on May 10, 2026 at 10:08 pm

    In strict compliance mode (that means ‘in theory’), you invoke undefined behaviour (which is bad) when you call a function that takes a variable number of arguments without a prototype declaration of the function in scope. That means that the compiler is allowed to do anything it likes with a program that uses printf() without the prototype from #include <stdio.h> or an equivalent declaration. ‘Anything it likes’ includes working correctly as one of the options; that seems to be the option chosen by your example.

    In practice, the code will work OK with most practical compilers even without the formal declaration of the printf() function.

    As was pointed out by qrdl, the function was found because the C compiler links with the C library.

    Note that Chris Young’s comment about C99 and ‘implicit int’ is accurate, but the rule about ‘variable arguments functions must have a prototype in scope’ applies to both C89 and C99. Most compilers do not work in a strict C99 compatibility mode by default because there is too much code that would not compile like that.

    Chris Young commented:

    To clarify, my comment was on C99 removing implicit declarations. By saying ‘implicit int’, I think you are referring to the C89 feature of allowing declarations such as foo(void); to mean int foo(void);, something C99 also removed.

    Chris is, of course, correct. There were two ‘implicit declaration’ features removed from the C99 standard. The foreword to the standard lists them as:

    • remove implicit int
    • remove implicit function declaration

    I was not thinking (and hence not writing) clearly enough. Nevertheless, both C89 and C99 require a prototype in scope for functions that take a variable number of arguments.

    To illustrate:

    extern int pqr(); int main(void) {     int i = pqr(1, 3);     return i; } 

    Without the first line, this is a correct C89 fragment with an implicit declaration of the function pqr() as a function that returns an integer (with unspecified arguments). If the first line is replaced by extern pqr();, then this is a correct C89 fragment with an explicit declaration of pqr() as a function that returns an integer (with unspecified arguments), but the return type is ‘implicit int‘. As written, the function is explicitly declared and has an explicit int return type – but it still has unspecified arguments. I believe that is valid C99 – albeit not wholly desirable. Certainly, GCC (3.4.4) accepts it with the options ‘-std=c99 -pedantic‘. Ideally, the function declaration should include the full prototype. (And, if pqr() were defined with ellipsis, that prototype would be required in theory!)

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

Sidebar

Ask A Question

Stats

  • Questions 115k
  • Answers 115k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I am quite interested in it as well but I… May 11, 2026 at 10:29 pm
  • Editorial Team
    Editorial Team added an answer I managed to work out what's causing this error, by… May 11, 2026 at 10:29 pm
  • Editorial Team
    Editorial Team added an answer The difference is an iframe is able to "float" within… May 11, 2026 at 10:29 pm

Related Questions

The UNIX /usr/bin/script command will create a running transcript of your shell session (see
Session variables are apparently not working for me. I don't know what I'm doing
Both Session.Clear() and Session.Abandon() get rid of session variables. As I understand it, Abandon()
A Session is per browser (determined via cookies), but when does an Application start,

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.