Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

int main () { int a,b,c,d; string s = Your first name; a= 4th Digit of your ID ; b= 5th Digit of your ID

int main () { int a,b,c,d; string s = Your first name; a= 4th Digit of your ID ; b= 5th Digit of your ID ; c= 6th Digit of your ID ; d= 7th Digit of your ID ; s= s + NSU ; int k=0; Stack st; for (int i=0; i

image text in transcribed

For this use id=1511108042

First name= RASHED

NSU ID 4th digit 5th digit 6th digit 7th digit First Name Fill in the tables with your information. Replace the red portions of the c++ program with the values from the table. You must use genuine Information. Part A: Now demonstrate the condition of the stack for the blue part of the code. You must show the condition after every push() & pop() operation. Draw the necessary boxes. [You can take help from the slide to understand how to draw this). Note: The program may stop executing depending on the values. If it happens you don't need to worry. Just demonstrate the steps one by one as long as it is executing. Whenever it stops, stop there and tell the reason why it stopped. Part B: Think deeply and tell that no matter what the values are can the program ever run successfully and print the line "DONE"? If yes, write the required values that can made the program run successfully. Note: Change the values of a, b, c, d & s as your wish to print the word "DONE" If no, modify the program so that it can run successfully and print the word "DONE" at least with the values from the table. Note: The changed function must have the same number of for loops as the given code. And the values of the variable a, b, c, d & s must be the same as PART A Keeping these in mind, you can make any changes you want to print the word "DONE

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

Step: 3

blur-text-image

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

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions