program to print company name on giving mobile no..??

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • manojverma1
    New Member
    • Aug 2010
    • 1

    program to print company name on giving mobile no..??

    hiiiiiiiii..

    i am lerning c language...i have some problem...

    i want to make program in c language...
    in which user enter his name ,address,mobile number..

    when he enter mobile no..in output screen..it show the name of mobile no company..like airtel,reliance .vodafone,hutch ..

    kindly help me please...
  • whodgson
    Contributor
    • Jan 2007
    • 542

    #2
    How are the mobile numbers related to the company names?

    Comment

    • weaknessforcats
      Recognized Expert Expert
      • Mar 2007
      • 9214

      #3
      What you need is a struct for the mobile. In that struct you have the mobile number aand the company. You create a variable for the mobile number.

      Then design a struct for your user. In that struct add a member that it a pointer to a mobile. Then when you create a user variable you add insert the address of the mobile variable.

      This allows you to add values to the user struct variable and when you get ot the mobile number you can call a function that creates a mobile variable and then asks for the number and the company. The function returns the address of the mobile variable it created and you put that address in the mobile pointer inside the user struct variable.

      Comment

      Working...