C++ Answers

Questions answered by Experts: 9 913

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

after the execution of the following code, what will be the value of x?

int x=5;

if(x>5)

x=x+10;

else if(x<3)

x=x-5;

else x=100;


write a simple c++ program to compute the area of a circle


Produce a pseudocode, a flowchart, and a program that computes for the toll charge of trucks entering San Miguel and exiting Tipo. The toll charge is P 73.55 per kilometer. San Miguel starts at km 0 and ends at Tipo at km 63. The toll charge is inclusive of 8.25% tax.

Sample run:

Welcome to Toll Plaza

Please pay: P 4633.65

Tax: P 353.14

Amount tendered: P 5000

Change: P 366.35



 Create class PI with data members roll and name. Create another class AI with data members sub1 and sub2. Derive a class Student from PI and AI classes. Student class has one data member total to calculate the sum of sub1 and sub2.


Write a program that reads an integer between 0 and 1000 and adds all the digits in the integer. For example, if an integer is 932, the sum of all its digits is 14.


Your task is to design Dynamic Array (Class).
Your class should work for one and two dimensional Arrays
The class should enable the user to perform the following tasks:
1) Create a dynamic array of size specified by the user. Use an integer to keep track of the
size
2) Ask the user for numbers to insert until the user presses -1. Insert each value in the array.
Create a new larger array when the array is full, copy all data to the new array, and release
the memory for the old array. Print the array after each insert.
3) Ask the user for any numbers to delete until the user presses -1. Find the index of the
entered value in the original array and then remove that index from the original array.
Stop when the array is empty or when the user presses -1. Keep on reducing the array size
and print the array after each removal.
4) Make sure to release any allocated memory not yet released.
Note: make class or classes for these and call the functions in main
Write some code segment that inserts a node immediately after the "current" node, as
depicted below:
linked list
current pointing to B
A
C
After inserting 1st node X in the Linked List :
NOw current pointing to X node after inserting
A
C
X
B
List before inserting Node with String "X" , Write the code it should be in executing, take
dummy data to insert data, run the code make sure there is no error
Write a SortedInsert() function which given a list that is sorted in increasing order, and a single
node, inserts the node into the correct sorted position in the list. Use Insert() function of task 1
allocates a new node to add to the list, SortedInsert() takes an existing node, and just rearranges
pointers to insert it into the list.
Consider two sorted linked lists L1 and L2, both containing integers in increasing order. Merge
these two lists into one list L3 such that L3 should also be sorted but in decreasing order. For
example L1 (1, 3, 5, 6) and L2 (2, 4, 8, 9) are merged into a list L3 (9, 8, 6, 5, 4, 3, 2, 1). We do
not know the size of lists L1 and L2. Add the function to Task 1.
The Linked List contains certain Nodes containing data of integer type, You cannot use any
other type of Array or data structure neither doubly Linked List. Use only singly linked list,
Implement a function which can reverse the List. Write down the code take dummy data to
test and take snap shot to show output paste it in document.
LATEST TUTORIALS
APPROVED BY CLIENTS