Explain what is a stack and different operations & pointers

Assignment Help Basic Computer Science
Reference no: EM131006314

1. Explain what is a Stack and different operations & pointers associated with stack. Then write a program to implement stack as an array of 5 integers. Create this array as a global variable. Write different functions for push, pop & display. Inside "main", print a menu and provide selections using switch-case-default inside an infinite loop. Your screen should look like:

1. Push on the stack

2. Pop from the stack

3. Print stack

4. Exit

2. Explain what is a Queue and different operations & pointers associated with a queue. Then write a program to implement queue as an array of 5 integers. Create this array as a global variable. Write different functions for enqueue, dequeue, display & peek. Inside "main", print a menu and provide selections using switch-case-default inside an infinite loop. Your screen should look like:

1. enqueue

2. dequeue

3. display

4. peek

5. exit

Reference no: EM131006314

Questions Cloud

How much heater power peis required when desired dryer air : .If the convection heat transfer coefficient between the air and the exposed switch surface of 30 mm2 is 25 W/m2 .K, how much heater power Peis required when the desired dryer air temperature is T8 = 50°C?
Unemployment benefits should effect the wage accepted : In a world of job-finding and search, unemployment benefits should effect the wage accepted, but not the length of time spent searching for a job. The number of monthly separations between workers and firms is about 200,000, equal to a decent month’s..
What is the total supply of the fringe : An industry consists of a dominant firm with costs C(Qd) = Qd and 8 identical fringe firms, each with costs c(q) = 1 + q^2. Market demand is Q = 20 - p. What is the supply schedule for a fringe firm in the long run? Sketch the supply. (You would need..
Problem regarding the management information system : Suppose that you have to develop a conceptual model for your university's library management information system. Discuss how you would gather requirements for this system.
Explain what is a stack and different operations & pointers : Explain what is a Stack and different operations & pointers associated with stack. Then write a program to implement stack as an array of 5 integers.
Primary key for this entity : Attributes for a book include book identification number, book title, author, ISBN, publisher, edition, and stock. Identify the primary key for this entity. What attributes would be associated with other entities and used as foreign keys?
What if the real demand increases permanently : Suppose that the monetary authority wants to keep the nominal interest rate, i, constant. Assume that the real interest rate, r, is fixed. However, the real demand for money, M^(d)/P shifts around a great deal. How should the monetary authority vary ..
Construct an e-r model for scenario : The agency provides information on resorts, room types, room capacity, room rate, and availability. Students can book through the agency, while payment is made directly to the resort. Construct an E-R model for this scenario.
Which curve is involved and the direction of the change : In each of the following cases, in the short run, determine whether the events cause a shift of a curve or a movement along a curve. Determine which curve is involved and the direction of the change.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Preparing company-wide migration to windows 8

Crescent Manufacturing Inc. (CMI) is a luxury leader in crafted and customized home furnishings. The corporate headquarters and a production facility are located in Texas, with additional manufacturing facilities located in Nebraska and Maryland.

  Which design strategy would you recommend

Assume that you are developing a new system for a local real estate agency. The agency wants to keep a database of its own property listing and also wants to have access to the city wide multiple listing service used by all real estate agency. Which ..

  Discuss ways to exchange data between excel and other

Excel 2013 provides the capability to exchange data with other applications. Discuss the different types of ways to exchange data between Excel and other Microsoft applications. Are there limitations to the exchange process? Think of some specific ex..

  Use a single if statement and boolean operators

Write a program that asks the user for a year and computes whether that year is a leap year. Use a single if statement and Boolean operators.

  What are some ways increase our chances of success

IT Projects are notoriously difficult to complete successfully and they are expensive to start with. Most failures can be attributed to issues not directly tied to technology issues, but rather issues of organizational behavior.What are some ways in ..

  Write a java program to compute the squares of the numbers

Write a java program to compute the squares of the numbers in the array list like 1, 2, 3, 4... up to 50.Write a java program to compute the sum of numbers and average in the array list up to 50.Write the java program to find the minimum a..

  Anomalous behaviour of fifo

Describe Belady's anomaly and provide an example that illustrates anomalous behaviour of FIFO.

  How procuring organization has sorted out problem

You are the engineer involved in development of financial system. Should you simply abandon work until procuring organization has sorted out problem?

  What''s the relationship between voltage

What's the relationship between voltage, current, and resistance? How can voltage, current and resistance be used in circuit design?

  Write a class called student that will keep track of student

Write a class called Student that will keep track of a student and a grade.

  Describe the most effective advanced filtering interface

Describe the most effective advanced filtering and search interface. Argue why the interface you chose is more effective than others, and describe who benefits most from the interface you are describing.

  Discussing two of the additional dba responsibilities

Write a 500-1000 word paper using Word discussing two of the additional DBA responsibilities. Use at least two sources outside your text for this paper. Do not use Wikipedia. Use APA format for the paper, and be sure to cite all your sources using AP..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd