1. Welcome to PHCorner Forums. Take a moment to Sign up and gain unlimited access and extra privileges that guests are not entitled to, such as:

    All that and more! Registration is quick, simple and absolutely free. Join our community today!

C and C++ How to make Sorting and Searching Program.

Discussion in 'Coding, Programming' started by Jeanh, Apr 25, 2016.

  1. How to make Sorting and Searching Program.



    Sorting and Searching is an important task in Please or Register to view links. Here we will see such a Please or Register to view links. This program is used to sorting ands earching a string array. Running this program we will provide names and given names are sorted and searched by the program. Please or Register to view links is given bellow?

    Code:

       Sorry you need to Register / Login to see this Codes!    

    Output:

    [​IMG]


    Remarks

    After giving name( Please or Register to view links) we can see the list of name and then sorted list. When we will give a name and search, we will see that name if it is in array otherwise name not found on the screen. Here strcpy () Please or Register to view linksis used to copy one variable’s value another variable and strcmp() Please or Register to view links is used to compare two string. fflush Please or Register to view links) is used to flush buffer.

    [​IMG]
     
    Last edited by a moderator: May 6, 2016
    henji likes this.
  2. thanks sa share Jeanh!
     
Tags / Keywords: