Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
My first structure
//gcc 5.4.0 #include <stdio.h> #include <string.h> int main(void) { typedef struct { int account_number; char account_type[20]; char account_holder_name[40]; double balance; } bank_customer; bank_customer bank_customers[5]; int n=5; bank_customers[0].account_number=1001; strcpy(bank_customers[0].account_type,"Checking"); strcpy(bank_customers[0].account_holder_name,"John Paul"); bank_customers[0].balance=2100.50; bank_customers[1].account_number=1002; strcpy(bank_customers[1].account_type,"Checking"); strcpy(bank_customers[1].account_holder_name,"GI Joe"); bank_customers[1].balance=1000; bank_customers[2].account_number=1003; strcpy(bank_customers[2].account_type,"Checking"); strcpy(bank_customers[2].account_holder_name,"GI Jane"); bank_customers[2].balance=1500; bank_customers[3].account_number=1004; strcpy(bank_customers[3].account_type,"Checking"); strcpy(bank_customers[3].account_holder_name,"Cobra Commander"); bank_customers[3].balance=4005; bank_customers[4].account_number=1005; strcpy(bank_customers[4].account_type,"Checking"); strcpy(bank_customers[4].account_holder_name,"Snake Eye"); bank_customers[4].balance=3005; for(int i=0;i<n;i++){ printf("Account Number=%d\n",bank_customers[i].account_number); } }
run
|
edit
|
history
|
help
0
Atomic Openmp
SortedMerge
20171103_Digitos
Matrix multiplication. C
Print Micro Seconds
Exm
Matrix rotation 90-degree
18BCE2182 ASSESS_2 Q-1
20171116_PI
Char data type.c