C Puzzle

This is a discussion on C Puzzle within the C Programming forums, part of the General Programming Boards category; Hi All, This is one of the puzzle asked in the interview give ur answers Create a File using naming ...

  1. #1
    Registered User
    Join Date
    Jun 2007
    Posts
    3

    C Puzzle

    Hi All,

    This is one of the puzzle asked in the interview give ur answers

    Create a File using naming convention as YYMMDDHHmm.DAT using C Programming.
    where
    YY -> Year
    MM-> Month
    DD-> Day
    HH-> Hour
    mm-> Minutes

    A quick response will be highly appreciated.

    Thanks.

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,485
    No puzzle at all, just a simple homework problem.
    http://cboard.cprogramming.com/annou...t.php?f=4&a=39

    You post an attempt first, or at least try to demonstrate what effort you have made.

    > A quick response will be highly appreciated.
    http://catb.org/~esr/faqs/smart-questions.html#urgent
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,046
    Hint: sprintf().
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. The puzzle again...Swapping elements of 2D array
    By crazygopedder in forum C Programming
    Replies: 44
    Last Post: 11-05-2008, 12:53 PM
  2. Replies: 12
    Last Post: 06-06-2008, 05:26 PM
  3. Crossword Puzzle Program
    By Loctan in forum C++ Programming
    Replies: 2
    Last Post: 07-31-2006, 11:08 PM
  4. Solution to Google Puzzle 3,3,8,8=24
    By LuckY in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 06-01-2006, 09:12 AM

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