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

  Write a program that reads three whole numbers

Write a program that reads three whole numbers and displays the average of the three numbers.

  What tools would you use to assist in your planning efforts

Explain the process of characterizing a new internetwork using the OSI model as its foundation.

  Find the sum of the elements of an array called list1

Write a program to find the sum of the elements of an array called list1. The size of list1 is four bytes. The values of list1 are $FF, $1, $FE, and $02. To check your work, the sum should become $0200.

  Explain how fuzz based systems work

Explain how fuzz based systems work and provide a detailed example of a system that utilises fuzzy logic.

  Introduction to information systems

Complete the On Your Own project (PC or Mac version) according to the project instructions and submit your assignment through the online course shell.

  What types of output and information delivery

What types of output and information delivery would you suggest for the system? Please support answer with references from the Internet. When citing references please do so with APA 6th edition formatting.

  Write an anonymous block that places a substitution variable

Write an anonymous block that places a substitution variable (&) into a local variable of type character. You should check the value entered in the local variable and output different messages depending on the value provided.

  Dos attacks exist for which part of the osi protocol stack

DoS attacks exist for which part of the OSI protocol stack?

  Why globalization is good or not good for a business

Write an argumentative paper of no more than 750 words that demonstrates why globalization is good or not good for a business. The paper should define the term good, and should identify the premises and conclusions.

  Conflict-management techniques

Conflict-management techniques allow leaders to control conflict levels (not only decrease them, but also increase them). Select a problem that disturbs you and is not solved. The problem can address any environment-your workplace, your community, ..

  Describe the concepts of snapshotting and failover

Create a table that shows the maximum number of networks and nodes associated with class A, class B and class C IPv4 addresses. Also show in your table the associated CIDR notation of each class type.

  Describe the windows xp operating system

Describe the Windows XP operating system. Discuss some of your favorite XP features, including its security, management, and administrative features. How do these compare with similar functionalities of other operating systems that you've used

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