Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8339023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T04:46:13+00:00 2026-06-09T04:46:13+00:00

I have 2 functions below. How do I change the code so that it

  • 0

I have 2 functions below. How do I change the code so that it will display by letter?

e.g if I define “A”, it will only showAllRecords that begin with A.

char* displayRecordContent (CountryRecordType ctryRec)
{
  char * output;
  output = ctryRec.Country;
  return output;
}

// ====================================================================

void showAllRecords ()
{
  int i=0;
  char * result;
  for (i=0; i<NoOfRecordsRead; i++)
  {
    result = displayRecordContent (globalCountryDataArray [i]);
    printf ("(%d) %s\n", i, result);
  }
}

Output:

(0) Andorra
(1) United Arab Emirates
(2) Afghanistan
(3) Antigua and Barbuda
(4) Anguilla
(5) Albania
(6) Armenia
(7) Netherlands Antilles
(8) Angola
(9) Antarctica
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T04:46:14+00:00Added an answer on June 9, 2026 at 4:46 am
    void showAllRecords (char begin)
    {
      int i=0, j=0;
      char * result;
      for (i=0; i<NoOfRecordsRead; i++)
      {
        result = displayRecordContent (globalCountryDataArray [i]);
        if (result[0] == begin) {
            printf ("(%d) %s\n", j, result);
            j++;
        }
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok so I have a text file that will change regularly that I need
I have a function that will change a combo box selected index, so combobox_selectionchanged
I have two jQuery functions. The first one below I want to run first,
I have an example function below that reads in a date as a string
I have a function as below extern C int FuncTrace(const char *fmt, ...) {
I have a function(please see code below) which reads some data from the web.
I have two ajax functions that fetch JSON objects using .getJSON and then build
I have some code that retrieves a scripted svg image from a server via
I have an issue with this jquery code below. Please give me advice or
i have one image and i want that when i will home mouse on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.