A. Create a structure,called creditcard that contains threemembers: credit_card_
ID: 3615816 • Letter: A
Question
A. Create a structure,called creditcard that contains threemembers: credit_card_number (integer datatype), authorization_number (integer data type)and amount_to_charge (float data type):
B. Create an array called records, which contains50 creditcard structures.
C. Using three lines of code, initialize the datafor records[25] to: credit_card_number =4111111, authorization_number=56222and amount_to_charge = 29.95.
D. Create a pointer to creditcard and callit cardPtr. Initialize cardPtr to pointto the zeroeth element of the records array.
E. Using cardPtr defined above, initialize the datafor records[0]to: credit_card_number=599121, authorization_number =89333 and amount_to_charge = 49.95.
F. Using cardPtr, print out all data containedin records[25].
Explanation / Answer
I ran the program, it compiles and runs fine, but the problem is, it prints out two lines of text saying only credit card number, and give random numbers each time the program is run. instead of printing the record
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.