Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

List the output of the following program segment. If an error is contained in the program,please mark and explain the error. For the rest of the program, assume that all lines with an error are removed from the program.

#include<iostream.h>

class Node{

public: double data

private: Node *next;

};

int main(void){

double *px,*py;

double x,y;

Node *p,*q,*r;

x=9.5;

y=-2.0;

px=8.6;

*px=10.0;

*x=*px;

x=*px;

py=&y;

p=new Node();q=new Node();r=new Node();

p->data=1.0;

q->data=2.0;

r->data=3.0;

p->next=q;

q->next=r;

r->next=p;

cout<<*px<<endl;

cout<<x<<endl;

cout<<*py<<endl;

cout<<q->next;

cout<<p->next->next->next->next->data<<endl;

delete q;

cout<<p->next->next->next->next->data<<endl;

return 0;

}


An events ticket booking System prompts the user to make a choice as well as the number of tickets required. It then displays the total cost of the order. The menu options and cost per ticket is as follows: 1 Exclusive VIP area A : R3 000.00 2 VIP area B : R2 000.00 3 Elevated area :R1200.00 4 General area R600. 0 QUIT


Create an AVL tree with the following keys,clearly show visually each step.Each step wil contain a mark.

12,33,44,43,99,0,88,13,43,2,222


Convert the expression into postfix notation and then verify if it is correct or not,direct answers for both 5conversion are not allowed for verification take dummy values for eachvariable.


a+b*(c/d-e)%(f+g*h)-i


Note:

1)No code is required.


Enter item price: 500
Price of item: R500.0
Final price of item: R475.0
Press any key to continue...
Enter item price: 1500
Price of item: R1500.0
Final price of item: R1425.0
Press any key to continue...
Enter item price: 100
Price of item: R100.0
Final price of item: R100.0

Convert the follwoing expressio to postfix notation. Show the state of stack and expression after each step.

( ( 2 * ( 6 + 3 ) ) / ( 4 - 6 + 4 ) ) / 5

Note:

1)no code is required.


Convert the given postfix expression into equivalent infix expression.Show all steps ,no marks will be given for direct answer.

a b + c -d e * /


the out put should be 12x^4 + 9x^3 - 5x^2 - x - 1 but our code does not give this out put




Suppose that items A, B, C, D and E are pushed in the order, onto an initially empty stack S. S is then popped 4 times; as each item is popped of, it is inserted to an initially empty queue. If two items are then removed from the queue, what is the next item that will be removed from the queue?

NOTE:
Your rough work should b with the answer
Write pseudocode to represent the logic of the following program:
• The program allows the user to enter three values.
• The values represent hourly pay rate, the number of hours worked
this pay period, and percentage of gross salary that is withheld.
• The program multiplies the hourly pay rate by the number of hours
worked, giving the gross pay.
• Then, it multiplies the gross pay by the withholding percentage,
giving the with- holding amount.
• Finally, it subtracts the withholding amount from the gross pay,
giving the net pay after taxes.
• The program outputs the net pay.
LATEST TUTORIALS
APPROVED BY CLIENTS