Thread: C Puzzle

  1. #1
    Registered User
    Join Date
    Jun 2007

    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.
    YY -> Year
    MM-> Month
    DD-> Day
    HH-> Hour
    mm-> Minutes

    A quick response will be highly appreciated.


  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    No puzzle at all, just a simple homework problem.

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

    > A quick response will be highly appreciated.
    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.

  3. #3
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Hint: sprintf().

    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:

    My website:
    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, 01: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
    Replies: 10
    Last Post: 06-01-2006, 09:12 AM