#include #include struct user {     char user_name[10];     char bank_name[10];     int account_num[4];     int card_number[14];     int pass[4];     int balance;     int wallet_num[11]; }; int num_acc; int withdrawal; int deposition; char transaction; int k; int number_of_papers; int choice4; void print_array(int arr[], int size) {     for (int i = 0; i < size; i++)     {         printf("%d", arr[i]);     }     printf("\n"); } void print_struct(char username[], char bankname[], int accountnum[], int size3, int cardnum[], int size4, int balance) {     printf("Username is %s", username);     printf("\nBankname is %s\n", bankname);     printf("Account number is ");     print_array(accountnum, size3);     printf("Cardnumber is ");     print_array(cardnum, size4);     printf("Balance is %d\n", balance); } void scan_array(int arr[], int size) {     for (int i = 0; i < size; i++) {         scanf_s("%d", &arr[i]);     } } int search_name_in_array(struct user user[], int size1, char arr[]) {     int flag = -1;     for (int i = 0; i < size1; i++) {         if (strcmp(user[i].user_name, arr) == 0)         {             flag = i;         }     }     return flag; } int main() {     //Making a modern ATM     struct user user[4] = { {"doha" , "cib" , {2 ,0,0,4},{2,0,2,2,0,0,4,2,0,2,2,0,0,4} , {2,2,2,2} , 2000000 ,{0,1,1,2,3,4,5,6,7,8,9} },                 {"ahmed" , "bm" , {2 ,0,0,3},{9,1,0,2,0,0,3,9,1,0,2,0,0,3} , {0,4,2,0} , 2500000, {0,1,0,2,3,4,5,6,7,8,9} },                 {"yara" , "ahly" , {2 ,0,0,2},{4,2,2,6,1,1,1,7,2,9,1,4,0,2} , {2,6,1,1}, 57800,{0,1,0,3,4,5,6,7,8,9,0}},                 {"jana" , "nbk" , {2 ,0,0,5},{1,7,1,1,2,0,3,1,7,1,1,2,0,3} , {1,7,1,1}, 2500 , {0,1,1,4,5,6,7,8,9,0,1} }     }; A flowchart for that part of a code.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

#include <stdio.h>
#include <string.h>

struct user {
    char user_name[10];
    char bank_name[10];
    int account_num[4];
    int card_number[14];
    int pass[4];
    int balance;
    int wallet_num[11];
};

int num_acc;
int withdrawal;
int deposition;
char transaction;
int k;
int number_of_papers;
int choice4;

void print_array(int arr[], int size)
{
    for (int i = 0; i < size; i++)
    {
        printf("%d", arr[i]);
    }
    printf("\n");
}

void print_struct(char username[], char bankname[], int accountnum[], int size3, int cardnum[], int size4, int balance)
{
    printf("Username is %s", username);
    printf("\nBankname is %s\n", bankname);
    printf("Account number is ");
    print_array(accountnum, size3);
    printf("Cardnumber is ");
    print_array(cardnum, size4);
    printf("Balance is %d\n", balance);
}

void scan_array(int arr[], int size)
{
    for (int i = 0; i < size; i++) {
        scanf_s("%d", &arr[i]);
    }

}

int search_name_in_array(struct user user[], int size1, char arr[]) {
    int flag = -1;
    for (int i = 0; i < size1; i++) {
        if (strcmp(user[i].user_name, arr) == 0)
        {
            flag = i;
        }
    }
    return flag;
}

int main()
{
    //Making a modern ATM
    struct user user[4] = { {"doha" , "cib" , {2 ,0,0,4},{2,0,2,2,0,0,4,2,0,2,2,0,0,4} , {2,2,2,2} , 2000000 ,{0,1,1,2,3,4,5,6,7,8,9} },
                {"ahmed" , "bm" , {2 ,0,0,3},{9,1,0,2,0,0,3,9,1,0,2,0,0,3} , {0,4,2,0} , 2500000, {0,1,0,2,3,4,5,6,7,8,9} },
                {"yara" , "ahly" , {2 ,0,0,2},{4,2,2,6,1,1,1,7,2,9,1,4,0,2} , {2,6,1,1}, 57800,{0,1,0,3,4,5,6,7,8,9,0}},
                {"jana" , "nbk" , {2 ,0,0,5},{1,7,1,1,2,0,3,1,7,1,1,2,0,3} , {1,7,1,1}, 2500 , {0,1,1,4,5,6,7,8,9,0,1} }

    };

A flowchart for that part of a code.

Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY