What is the output of the following program.?
#include <iostream>
using namespace std;
struct ShoeType
{
char style;
double price;
};
int main()
{
ShoeType shoe1,shoe2;
shoe1.style = 'P';
shoe1.price = 98.98;
cout << shoe1.style << " $" << shoe1.price << endl;
shoe2 = shoe1;
//Put shoe2 on sale!
shoe2.price = shoe1.price/2;
cout << shoe2.style << " $" << shoe2.price << endl;
}
Correct Answer:
Verified
Q27: The dot operator is used between an
Q28: Given the ShoeType structure type-definition.Write a function
Q29: Carefully distinguish between the scope resolution operator,and
Q30: It seems that mutator and accessor functions
Q31: Carefully define mutator and accessor functions of
Q32: Given the ShoeType structure type definition.Write a
Q34: Write a definition for a structure type
Q35: Carefully identify,define each term and give differences
Q36: A member of a structure or of
Q37: Given the ShoeType structure type definition,write a
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents