首页 > > 详细

C辅导 Array based FIFO解析数据结构设计、R程序解析

Introduction
:
#include
using namespace std;
int Array=NULL;
int head;
int count;
int testData;
int Size=5;
int exit()
{
cout<<”…exit”<
Requirement
Array based FIFO
Write a program that implements an array based Queue. UDFs should be used extensively.
Main should only contain calls to UDFs. Variables used may be declared globally.
These are the UDFs that you should include: This is very similar to Push and Pop.
int exit();
void enter(int t);
void display();
void isfull();
void isempty();
void initialize();
Here is my main:
int main()
{
int l;
initialize();
display();
enter(1);
display();
isfull();
enter(2);
display();
enter(7);
display();
enter(9);
display();
isempty();
enter(13);
display();
exit();
display();
enter(42);
display();
exit();
display();
enter(25);
display();
enter(19);
display();
isfull();
return 0;
}
The numbers I tried to insert are:
1 2 7 9 13 42 25 19
My maxsize was 5.
Here is my output. My output shows the calls to UDFs. Do this also. Your output
should duplicate this.

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!