Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hi, can someone add command-line arguments for debugging? My code is working I just need to incorporate debug mode. Here is my program: #include #includerecord.h

Hi, can someone add command-line arguments for debugging? My code is working I just need to incorporate debug mode.

Here is my program:

#include

#include"record.h"

#include"database.h"

void getaddress (char s[], int a){}

void menu()

{

printf(" Greetings, what do you want to do with the database? ");

printf("------------------------------------------------------------------------ ");

printf(" 1. add ");

printf(" 2. printall ");

printf(" 3. find ");

printf(" 4. delete ");

printf(" 5. quit ");

}

int main(int argc, char *argv[])

{

struct record * start = NULL;

int tempaccNum;

int accNum = 0;

char name[25];

char inputAddress[50];

int menus;

do { menu(); printf("Enter your choice: "); scanf("%d", &menus); printf(" "); /* Accepts data for new customer */ if (menus == 1) { printf(" Enter account number: "); scanf("%d", &accNum); printf(" Enter name: "); scanf("%s", name); printf(" Enter mailing address( press ';' to end input): "); scanf("%[^;]%*c", inputAddress); getaddress(start->address, accNum); } /* printing records in the database */ else if (menus == 2) { printAllRecords(start); } /* Accepts account number to search */ else if (menus == 3) { printf(" Enter account number to search: "); scanf("%d", &tempaccNum); findRecord(start, tempaccNum); } /* Accepts account number to delete */ else if (menus == 4) { printf("Enter account number to delete: "); scanf("%d", &tempaccNum); deleteRecord(&start, tempaccNum); } /* quit the program */ } while (menus != 5);

return 0;

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Expert Oracle9i Database Administration

Authors: Sam R. Alapati

1st Edition

1590590228, 978-1590590225

More Books

Students also viewed these Databases questions

Question

LO4 Identify a system for controlling absenteeism.

Answered: 1 week ago

Question

Why is the System Build Process an iterative process?

Answered: 1 week ago