Thread: predefined symbolic constnts

  1. #1
    Registered User
    Join Date
    Dec 2006
    Posts
    11

    predefined symbolic constnts

    i have created this program to simple print the values of std. preprocessor constants

    Code:
    #include <stdio.h>
    int main()
    {
    printf("%d \t %s \t %d \t %d",__LINE__,__FILE__,__DATE__,__TIME__);
    }
    the first two value prints correct. but last two r not so wats the error??????

  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    wrong format
    Code:
    #include <stdio.h>
    int main()
    {
    printf("%d \t %s \t %s \t %s",__LINE__,__FILE__,__DATE__,__TIME__);
    }
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  3. #3
    Registered User
    Join Date
    Dec 2006
    Posts
    11
    thx a lot

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 5
    Last Post: 06-01-2009, 07:54 PM
  2. is there a weird rule about symbolic constants?
    By i_can_do_this in forum C Programming
    Replies: 5
    Last Post: 07-10-2006, 07:14 AM
  3. Predefined FileOpen, SaveAs, etc. in C?
    By xjcass in forum Windows Programming
    Replies: 2
    Last Post: 11-08-2003, 09:38 AM
  4. Going out of scope
    By nickname_changed in forum C++ Programming
    Replies: 9
    Last Post: 10-12-2003, 06:27 PM
  5. anyone ever heard of symbolic programming
    By Unregistered in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 02-18-2002, 12:30 PM