Create an email id

Discussion in 'C' started by saiganesh, Dec 8, 2015.

  1. saiganesh

    saiganesh New Member

    Joined:
    Dec 8, 2015
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    tell me how i m a new learner give me some ideas regarding below post

    create email id: input string1 = first_name last_name,output stiring = last_name.first_name@email.com
     
  2. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,009
    Likes Received:
    203
    Trophy Points:
    63
    Occupation:
    Senior Support Engineer
    Location:
    England
    Not too difficult, if they've taught you so far:
    - how to declare a string variable;
    - how to read from the console into a string variable (scanf, probably)
    - how to display variables on the screen (printf, probably)

    So you need to:
    - declare two string variables first_name and last_name
    - read from the console into first_name
    - read from the console into last_name
    - display the following strings in order:
    - - last_name;
    - - a period;
    - - first_name;
    - - the string "@email.com"

    Slightly more difficult if you're meant to read first and last names into the same string variable; you'd have to split it, in which case read from the console into string1 which is a 3rd string variable, then use a for loop to copy from string1 into first_name and last_name, then pick up from "display the following strings in order".
     
  3. saiganesh

    saiganesh New Member

    Joined:
    Dec 8, 2015
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    it helped me actually i have to do the second one
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice