Untitled
unknown
plain_text
a year ago
1.2 kB
7
Indexable
void plastic_card(char branding[], int number, char nameofcardholder[], char chip[], int expired, char logo[]); int main() { //step3 double x, *ptr; x = 10; ptr = &x; printf("original value is: %e\n", x); *ptr = 25; printf("the new value is: %e\n", x); printf("\n\n"); //step4 double p = 3.7; double e = 2.7; printf("before swap, the value of p is : %f\n", p); printf("before swap, the value of ls is : %f\n", e); swap(&p, &e); printf("after swap, the value of p is : %f\n", p); printf("after swap, the value of ls is : %f\n", e); //step5 struct card type = { "YourBank", 1234567890123456, "cardholder name", "there is a chip", 07/19, "LOCO" }; plastic_card(type.branding, type.number, type.nameofcardholder, type.chip, type.expired, type.logo); return 0; } void plastic_card(char branding[], int number, char nameofcardholder[], char chip[], int expired, char logo[]) { printf("card branding: %s\n", branding); printf("card number: %d\n", number); printf("cardholder name: %s\n", nameofcardholder); printf("smart chip: %s\n", chip); printf("expiry date: %d\n", expired); printf("logo: %s\n", logo); }
Editor is loading...
Leave a Comment