Code Monkey home page Code Monkey logo

country_listing-using-dsa's Introduction

country_listing-using-dsa

Country Listing Project

This program implements a simple stack data structure to manage a list of countries. Users can push a country onto the stack, pop a country from the stack, search for a country by name, and display the list of countries.

Data Structure:

The program uses a stack to store countries, where each country is represented by a structure with a character array to store its name. The maximum size of the stack is defined by MAX_Country_SIZE.

Functions:

  1. push(): Adds a new country to the top of the stack.
  2. pop(): Removes the country from the top of the stack.
  3. search(): Searches for a country by name in the stack.
  4. display(): Displays the list of countries in the stack.
  5. main(): The main function presents a menu to the user and calls corresponding functions based on the user's choice.

Usage:

  1. Compile the program using a C compiler (e.g., gcc).
  2. Run the compiled executable.
  3. Follow the on-screen menu to perform operations on the country stack.
  4. Choose the 'Exit' option to end the program.

Notes:

The program does not handle spaces in country names during input. It assumes a single word as the country name. The stack size is limited to MAX_Country_SIZE, and attempting to push more countries than the defined size will result in a stack full message. The search function performs a case-sensitive comparison when searching for countries by name.

Author:

Ashiqur Rahman

  • Group 04

    Date : 03-12-2023

country_listing-using-dsa's People

Contributors

imashiqe avatar

Stargazers

 avatar Muhammad Morsalin avatar Sadi Al Rafe avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.