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
2-dimension array got area by malloc()
Length width.c
PREGUNTA 2 EXAMEN
sorted array
A_141121_mayorMenor
Spring 2017 Project 2 v.02
% with negative numerator and positive denominator (gcc)
Lab 9 v0.95
ChangeStructVal
abc.c