Like Tree1Likes
  • 1 Post By matsp

printf() function definition

This is a discussion on printf() function definition within the C Programming forums, part of the General Programming Boards category; In which header file exactly printf() function is defined?? stdlib.h/libc.so...

  1. #1
    Registered User
    Join Date
    Apr 2008
    Location
    New Delhi,India
    Posts
    17

    printf() function definition

    In which header file exactly printf() function is defined??

    stdlib.h/libc.so

  2. #2
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,424
    stdio.h
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  3. #3
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Actually, the DEFINITION of printf() is not in any header file. There is a declaration (so that the compiler knows what the function looks like with respect to what arguments it takes), but the definition (describing to the compiler what the function does) is part of the C runtime library. In the glibc case, that would be printf.c.

    As you can see from that, most of the work is done in vfprintf.c

    --
    Mats
    goodluck likes this.
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling sample DarkGDK Program
    By Phyxashun in forum Game Programming
    Replies: 6
    Last Post: 01-27-2009, 02:07 AM
  2. In over my head
    By Shelnutt2 in forum C Programming
    Replies: 1
    Last Post: 07-08-2008, 06:54 PM
  3. Double to Int conversion warning
    By wiznant in forum C Programming
    Replies: 15
    Last Post: 09-19-2005, 09:25 PM
  4. Drawing tables in C
    By stanoman in forum C Programming
    Replies: 5
    Last Post: 10-09-2003, 10:14 AM
  5. function problems
    By money in forum C++ Programming
    Replies: 5
    Last Post: 07-16-2003, 11:40 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21