Write a program in assembly language that reverses the string “your name” using Stack parameters. You can hardcode your name or you can take it from the user.
Q: The Programming Example, Converting a Number from Binary to Decimal, uses recursion to convert a…
A: Since you are not mentioning the programming language, here we are using Python to complete the…
Q: Write in Java a stack that uses linked list and array
A: Program structure Create a class Node that represents a linked list structure. Declare integer…
Q: Write a C++ program to create template-based stack. Store int and float in it.
A: C++ program to solve the given problem is below.
Q: Develop a program which deciphers the string "Wg ngeb3i3rtiw3y h2no dnt1e eh7f ni3psim2ddn2" which…
A: The full JAVA code is given in next step along with output:
Q: Create a stack program in c++ wherein there should be a following expression for -(A+B)+(C-D…
A: Stack program in c++
Q: Write a Python program that will implement stack algorithm by converting infix expression to postfix…
A: Infix expression: An infix expression can be represented as:…
Q: Write a Java program that includes products' prices in a Stack. The program should function as…
A: Java program: import java.util.*; //Importing util packageclass Stack //Creating class…
Q: Using C programming ,write a program to imitate the train reservation system.The system will be used…
A: According to the information given:- We have to create c program to imitate train reservation…
Q: In C++, Write a program which is menu driven ( i) Push, ii) POP, iii) Peek iv) Print). It will…
A: Let us see the code for the above question:- A stack is a linear data structure that operates on the…
Q: Write a program that reads 10 integers anddisplays them in the reverse of the order in which they…
A: Program: //import the required header files import java.util.Scanner; import java.util.Stack;…
Q: Here is a PDA that is nearly finished. It is designed to recognize the language { a"b2n |n > O }. To…
A:
Q: Provide a flowchart and algorithm with regards to the code given below, and also please insert a…
A: Flow chart:
Q: Please implement a Pop() operation on a stack in Java. 1. The program should read in 18 different…
A: Ans:) Please follow the given instructions carefully: There are 3 main files in this project:…
Q: 2. Write a program in java to PUSH 10 students name in stack and search your name using stack search…
A: As per the requirement program is developed. Algorithm: Step 1: Write the main() method Step 2:…
Q: Please create a python function that uses a stack implementation that can turn the input list QWERTY…
A: A stack is a linear data structure which follows First In Last Out principle. This means the element…
Q: Code with comments and output screenshot is must for an Upvote Create a Java function that uses…
A: Algorithm: Start Read a string Implement a function which takes a string a argument Declare a stack…
Q: Write a program in 'C' that reverses a string using a stack.
A: Code: #include <stdio.h> #include <string.h> #define MAX 100 int top,stack[MAX];…
Q: Given Stack names=new Stack(); String temp="A"; names.push("John"); names.push("Mary");…
A: Please refer below for your refernce: Initially the stack is filled with John at bottom of stack and…
Q: Please implement a Pop() operation on a stack in Java. 1. The program should read in 18 different…
A: Ans:) For this project please follow the below instructions carefully. There are three classes in…
Q: Draw the stack frame of func() and point out the addresses of related variables. int n = 0; void…
A: Solution is provided in the next step :
Q: Ex1) Given the file arrayImpOfStack.java then write a main method to read a sequence of numbers and…
A: 1) Step 1:- declare Stack and Scanner class Stack<Integer> st = new Stack();Scanner…
Q: Can you help me with this question ? Show what is written by the following segments of code, given…
A: Let "push()" is used to insert the items into the stack. Let "pop()" is used to remove the element…
Q: Write a Python program to reverse a stack using recursion.
A: Given: Write a Python program to reverse a stack using recursion.
Q: What happens when you pop from an empty stack while implementing using the Stack ADT in Java?
A: Question. What happens when you pop from an empty stack while implementing using the Stack ADT in…
Q: Write a C++ program that contains the following: Template Stack
A: C++ code: #include <iostream>using namespace std; //Class Stack with default parameter…
Q: Homework : by C# language * if we think of compilers, they check weather the parentheses in the…
A: CONVERT STRING TO CHAR ARRAY SYNTAX string <VAR-NAME> = "Statement"; char[] charArray =…
Q: Write a complete C program (including main) to check whether the given expression has parentheses in…
A: We will use a stack data structure to solve this problem. If the expression is balanced we will…
Q: Write a JAVA method that uses JAVA Framework to create a stack, push 5 values onto the stack, and…
A: Solution: Given, Write a JAVA method that uses JAVA Framework to create a stack, push 5 values…
Q: I am writing a stack code, where there are two stacks that reads an array of 40 numbers and puts…
A: Note: Random data is used in Data_File.txt In Insert(): Element pushed into the non-working stack.…
Q: Write a C++ program to create template-based stack. Store int and float in it.
A: As per the given question, we need to design a program for implementing template based stack. Values…
Q: 4. Write a program to declare a stack of char data type and insert all the lowercase alphabets in…
A: Since programming language is not mentioned so I have used C++ programming language. Requirement:…
Q: Write a program in C++ that uses a stack to convert a binary number into an equivalant decimal…
A: Binary numbers: Binay numbers are the numbers that are used to represent the decimal numbers in…
Q: Write a program that must show the use of given functions of stack class of C++ STL. a) push() b)…
A: Required: Write a program that must show the use of given functions of stack class of C++ STL. a)…
Q: write a program in Python that checks if the parenthesis in the equation “([[y+t]*(j+9v)*{ww+yy})”…
A: Given that equation is ([[y+t]*(j+9v)*{ww+yy})
Q: A Java program contains various pairs of grouping symbols, such as: Parentheses: ( and) Braces: {…
A: Given that, the program should contain different types of parenthesis, if that are balanced then the…
Q: In the C++ example shown in Section 8.2.3, how much stack space is used by a variable oftype int?
A: Stack space used by a variable A stack space is a block of memory that is used to store temporary…
Q: tarting with an empty stack mimic the functionality of the back and forward button on modern…
A: Q: Java stack program showing browser properties.
Q: Given the code: 10 void f1(int n) { 11 cout << n; 12 } 13 int f2(int x) { 14 f1(x); 15 } 16…
A: For given code , line 19 in main function will have the most complex runtime stack.
Q: Take the following program and translate it into PEP/9 assembly language: #include using…
A: GetFibo where we are getting f1 and f2 value which will move to stack a1, b1. Count will produce…
Q: Draw a memory map for the code you see on the next page, until the execution reaches the point…
A: In java, the memory is represented mainly by four segments: Text segment- The bytecode or…
Q: Write a C++ program that converts infix expression like : {200(200+5-2*50/4)} to postfix and then…
A: Initialize the Stack. Scan the operator from left to right in the infix expression. If the leftmost…
Q: Write a program that uses a stack to print the prime factors of a positive integer in descending…
A: Program: #include <iostream> #include <cmath> using namespace std; void factor(int c,int…
Q: The Programming Example, Converting a Number from Decimal to Binary, contains a program that uses…
A: Since you are not mentioning the programming language, here we are using C++ to complete the…
Q: Write a java program to allow the user. 1. Enter 10 numbers. 2. Double the value of the numbers 3.…
A: JAVA Program for above : import java.util.*; class Prog{ public static void main (String[]…
Q: What are the two sorts of stack parameters that are often used?
A: What are the two sorts of stack parameters that are often used?
Q: NOTE: PLEASE ADD A COMMENT LINE OF MY CODE OR EXPLANATION LINE THANK YOU! public class…
A: - The question wants to add comments for the provided code.
Q: A. Write a program that will place 10 names on the stack and will input the name to be searched on…
A: Objective: A program puts 10 names on a stack and reads the name to be searched on the stack. In the…
Write a program in assembly language that reverses the string “your name” using Stack parameters. You can hardcode
your name or you can take it from the user.
Step by step
Solved in 2 steps
- // the language is c++, please code with common for better understanding, and after your code finished take a screenshot of the execution. Write a C++ program to simulate a stack using an array. You should create an index (the stack pointer) to point into the stack. Initialize it to 0. The stack should grow to location [1], [2], [3], etc. Write a "push (int)" function to push an int onto the top of the stack. Also, write an "int pop" instruction to pop the data that is stored on the top of the stack. The pop instruction must return the popped data. The push and pop instructions should increment and decrement the stack pointer appropriately. Your source should contain calls to your functions demonstrating that it works. Note, that you should do several pushes and several pops to show that data is correctly stored on the stack. You can do this by showing sample runs. Cut and paste the results of the runs into a separate documentFor the code shown in the screenshot below, draw a picture of the program stack when the function findSlope() is called the first time. You only have to draw the part of the stack for findZero() and findSlope().Code with comments and output screenshot is must for an Upvote Create a Java function that uses a stack and no arithmetic to compare the number of 0's and 1's in a string. If # of 0's is greater, return -1. If # of 1's is greater, return 1. If equal, return 0.
- Exercise 1: Write a program using the java.util.Stack data structure that prompts for an integer and reverses it: 7359 becomes 9537. Hints: Think of how base-10 works: A base-10 number is a sum of digit * 100 + digit * 101 + digit * 102, etc., where each digit in your number is that digit times a power of 10. Using that understanding, you can use modulo and integer arithemetic to get each digit and add it to a stack. Algorithm: Your number % 10 will give you the rightmost number. Example: 7359 % 10 = 9. Put the 9 on the stack. Now substract the 9 from original number: 7359 - 9 = 7350. Now take the 7350/10 to remove the zero. That is 7350 /10 = 735. Repeat the process, that is 735 % 10 = 5, put the 5 on the stack, substract the 5 and divide by 10. 730/10 = 73, use 73 % 10 to get the 3. Keep going, adding digits to the stack until you run out of numbers. When you pop the numbers off your stack, they will come off teh stack reversed. Note…Using C++, A contact list is a place where you can store a specific contact with other associated information such as a phone number, email address, birthday, etc. Write a program that first takes as input an integer N that represents the number of word pairs in the list to follow. Word pairs consist of a name and a phone number (both strings). That list is followed by a name, and your program should output the phone number associated with that name. Ex: If the input is: 3 Joe 123-5432 Linda 983-4123 Frank 867-5309 Frank the output is: 867-5309 A. Create a struct in your program called ContactInfo to store a name and a phone number. B. Define and call the following function. The return value of GetPhoneNumber is the phone number associated with the provided contact name. If the name is not found, the function should return "not found". string GetPhoneNumber(ContactInfo contacts[], int size, string contactName) C. Your main function should declare an array of ContactInfo structs of size…Write a C++ program to create a queue. The size of the queue will be dependent on the user. Insert the numbers in the queue till the queue reaches the size. Create a menu and perform the following function on that queue. Enqueue: Add an element to the end of the queue. Dequeue: Remove an element from the front of the queue. IsEmpty: Check if the queue is empty. IsFull: Check if the queue is full. Peek: Get the value of the front of the queue without removing it.
- Using C++(DSA, Topic: Singly linked list) Write a simple airline ticket reservation program. The program should display a menu with the following operations: reserve a ticket, cancel a reservation, check whether a ticket is reserved for person, and display the passengers. The information is maintained on an alphabetized linked list of names. In a simper version of the program, assume that tickets are reserved for only one flight. In a fuller version, place no limit on the number of flights. Create a linked list of flights with each node including pointer to a linked list of passengers. Note: Screen shot of working Demo will be shown.HOMEWORK * do it by C# languages. o If we think of compilers, they check whether the parentheses in the expression we wrote are the same. o For example: 2 * (i + 5 * (7-j / (4 * k)) has a lack of parentheses. ")" o Write the program that checks if the number of parentheses in the expression is equal, using the stack. interface design Rough code of the assignment o Check brackets using stack: 1) Create an empty stack and start reading the symbols 2) If the symbol is the start symbol ( (, 'C' '{' ) Put in the stack 3) If the symbol is the closing symbol( ), 'T, '}' ) 1. Return error report if stack is empty ENTER THE MATHEMATICAL EXPRESSION YOU WANT > TEXTBOX CHECK THE EXPRESSION WITH BUTTON II. If not THE STRUCTURE OF THE PILE Receive from stack Send error if received symbol is not the same as start symbol 4) If the statement is over and the stack is fullI, return an error.In c++, please. Thank you! A contact list is a place where you can store a specific contact with other associated information such as a phone number, email address, birthday, etc. Write a program that first takes as input an integer N that represents the number of word pairs in the list to follow. Word pairs consist of a name and a phone number (both strings). That list is followed by a name, and your program should output the phone number associated with that name. Define and call the following function. The return value of FindContact is the index of the contact with the provided contact name. If the name is not found, the function should return -1 This function should use binary search. Modify the algorithm to output the count of how many comparisons using == with the contactName were performed during the search, before it returns the index (or -1). int FindContact(ContactInfo contacts[], int size, string contactName) Ex: If the input is: 3 Frank 867-5309 Joe 123-5432 Linda…
- Use stack as a data structure in creating a program that enable to reversed the inputstring.Create a java program that asks a user to input student’s full name and reverses the string.The program should be able to print how the string is reversed and display the reversed string. The program should display one by one on how to reverse the string and then display the final output of the reversed string.For the code below, draw a picture of the program stack when the function findZero() is called the 2nd time.Create an application that reads a statement from the user and outputs it with the characters of each word reversed. To reverse the characters in each word, use a stack.Create an application that reads a statement from the user and outputs it with the characters of each word reversed. To reverse the characters in each word, use a stack.