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

  • Home
  • SEARCH
  • 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 3332664
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T23:42:43+00:00 2026-05-17T23:42:43+00:00

For a simple command-line todo manager (that is to be implemented in C), this

  • 0

For a simple command-line todo manager (that is to be implemented in C), this is what I have thought of the design:

  • The utility would support multiple users by storing the todo’s in different files for each

  • While running the program would hold all the data in memory itself. This would avoid unnecessary IO and is also quite suitable when you do not expect the user to have more than 20 todos (I am assuming this is true). So, if the user already exists, the user todo file would be read and all the data captured to memory (in arrays of rows(structures)) and then when user logs out the file would be updated.

The aim of the project is to show how it can be done while keeping things very simple.

This pseudo pseudocode outlines the structure

// define data structure memory limits
// and other constants

bootup() {
    // initialize data structures
}

readfile() {
    use rot13();
}

writefile() {
    use rot13();
}

login() {
    ask_for_username
    search for file or create one
    if file present
        readfile();
    ... and populate data structures
}

//1.
enter_new_task() {
    read
    record_time
    is_starred
    optional_due_date
}

//2.
...

fetch_commands() {
    show_command_menu();
    // 1. enter a new task
    // 2. see the list of tasks
    // 3. delete a task
    // 4. edit a task
    // 5. sort tasks by
}

while_not_logout() {
    display_ui();
    fetch_command();
    while(command != logout) {
        execute_command();
        update_ui();
        fetch_command();
    }
    writefile();
}

cleanup() {
    // free memory
}

int main() {
    bootup();
    login();
    while_not_logout();
    cleanup();
}

How can I improve the program structure/execution flow?

I want to know where all can I improve the program structure before I start plugging in the actual code. Any suggestions/comments are welcome.

  • 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-05-17T23:42:44+00:00Added an answer on May 17, 2026 at 11:42 pm

    If you want to keep everything in memory, then only call writefile from cleanup, or from main after while_not_logout. Why not support multiple users by keeping their todo list in their own homedir?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to write a simple command-line application in Java. It would be nice
I have a Python-based app that can accept a few commands in a simple
When using a simple command line svn client, if you run update you can
I have a simple goal: Map Ctrl-C, a command I don't think I've ever
I want to exceute a simple command which works from the shell but doesn't
The following code executes a simple insert command. If it is called 2,000 times
I'm aware that in Vim I can often repeat a command by simply adding
I'm making a simple tool that will get a string of MySQL commands and
Simple ASP.NET application. I have two drop-down controls. On the first-drop down I have
Simple question, but one that I've been curious about...is there a functional difference between

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.