#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    1
    Rep Power
    0

    Help required -How to put dot(.) in a string in C?


    Hi all,

    I am having string and I want to place dot(.) at 3rd and 6th position as given below--

    I am having string "10111988" and I want to convert it as "10.11.1988"

    I will appreciate and thanks in advance..
  2. #2
  3. Contributed User
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jun 2005
    Posts
    4,417
    Rep Power
    1871
    So what have you tried so far?

    This isn't a forum where you can just dump your assignment and expect us to give you a finished answer.
    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
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    156
    Rep Power
    34
    Originally Posted by smartgupta
    I am having string "10111988" and I want to convert it as "10.11.1988"
    The easiest way is to copy the string character-by-character, inserting the periods where needed.

    If you really want to change the string in place (make sure it has enough space) you need to move the characters right.

    Post your attempt and some one will certainly help you

IMN logo majestic logo threadwatch logo seochat tools logo