Int j;
j="name"[4];
// you could do
j=0; // since name has four letters the fifth character is the terminating 0
now if the string name is name
you could do
j=name[4]; // or even 4[name]
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.
Answer:
It provides detailed information about particular tasks within the program
Answer: The pharmacies and the employee and patient must be examined during the investigation.
Explanation: