Answer: Concurrent programs are the programs that execute at the same point of time. They are simultaneous in nature with other concurrent programs.They are executed with the help of threads to achieve the concurrency without the issue of scheduling. They are consider long running programs.
The program that has the low execution time compared with all other programs gets executed first.If the case of no progress is seen then another thread is executed.This type of execution gives the non- deterministic situation in which the possibility of leading completion of any particular program cannot be determined.
Answer:
python:
f = open("\info\bikes.txt", "r")
print(f.read())
Explanation:
Answer:
struct item
{
float previousCost;
float taxAmount;
float updatedCost;
} itemObject;
void calculation(int cost,int quantity,float tax)
{
struct item *itemPointer=&itemObject;
itemPointer->previousCost=(cost) * (quantity);
itemPointer->taxAmount=itemPointer->previousCost * (tax/100);
itemPointer->updatedCost=itemPointer->previousCost+itemPointer->taxAmount;
}
Explanation:
- Define a structure called item that has 3 properties namely previousCost, taxAmount and updatedCost.
- The calculation function takes in 3 parameters and inside the calculation function, make a pointer object of the item structure.
- Calculate the previous cost by multiplying cost with quantity.
- Calculate the tax amount by multiplying previous cost with (tax / 100).
- Calculate the previous cost by adding previous cost with tax amount.
"detection" by checking for possible cycles or knots.