main() {
  int LEN = 2;
  struct Account {
    int accno;
    char acctype;
    char name[25];
    float bal;
  };
  struct Account account[LEN];
  int i;
  for (i = 0; i < LEN; i++) {
    printf("Enter the account no\n");
    scanf("%d", &account[i].accno);
    printf("Enter the account type=\n");
    scanf("%s", &account[i].acctype);
    printf("Enter the name=\n");
    scanf("%s", &account[i].name);
    printf("Enter balance=\n");
    scanf("%d", &account[i].bal);
  }
  for (i = 0; i < LEN; i++) {
    printf("Account number: %d\n", account[i].accno);
    printf("Account Type: %s\n", account[i].acctype);
    printf("Account Name: %s\n", account[i].name);
    printf("Account Balance: %d\n", account[i].bal);
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
lea    (%rax,%rax,8),%rcx
lea    0xf(,%rcx,4),%rdx
movabs $0x7ffffffff0,%rcx
and    %rcx,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1243 <main+0x123>
lea    0xe7c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%rsi
movslq -0x1c(%rbp),%rax
imul   $0x24,%rax,%rax
add    %rax,%rsi
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xe6a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%rsi
movslq -0x1c(%rbp),%rax
imul   $0x24,%rax,%rax
add    %rax,%rsi
add    $0x4,%rsi
lea    0xe62(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xe57(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%rsi
movslq -0x1c(%rbp),%rax
imul   $0x24,%rax,%rax
add    %rax,%rsi
add    $0x5,%rsi
lea    0xe33(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xe39(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%rsi
movslq -0x1c(%rbp),%rax
imul   $0x24,%rax,%rax
add    %rax,%rsi
add    $0x20,%rsi
lea    0xde8(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1171 <main+0x51>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    12f9 <main+0x1d9>
mov    -0x28(%rbp),%rax
movslq -0x1c(%rbp),%rcx
imul   $0x24,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%esi
lea    0xde8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%rax
movslq -0x1c(%rbp),%rcx
imul   $0x24,%rcx,%rcx
add    %rcx,%rax
movsbl 0x4(%rax),%esi
lea    0xddb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%rsi
movslq -0x1c(%rbp),%rax
imul   $0x24,%rax,%rax
add    %rax,%rsi
add    $0x5,%rsi
lea    0xdcc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%rax
movslq -0x1c(%rbp),%rcx
imul   $0x24,%rcx,%rcx
add    %rcx,%rax
movss  0x20(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdb8(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xd70(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    124a <main+0x12a>
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
lea    0xefe(%rip),%r15
mov    %r15,%rdi
call   1040 <puts@plt>
lea    0xe9c(%rip),%r12
mov    %rsp,%rsi
mov    %r12,%rdi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xef0(%rip),%r13
mov    %r13,%rdi
call   1040 <puts@plt>
lea    0x4(%rsp),%rsi
lea    0xe77(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xee3(%rip),%rbp
mov    %rbp,%rdi
call   1040 <puts@plt>
lea    0x5(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xed5(%rip),%r14
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0x20(%rsp),%rsi
mov    %r12,%rdi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    %r15,%rdi
call   1040 <puts@plt>
lea    0x24(%rsp),%rsi
mov    %r12,%rdi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    %r13,%rdi
call   1040 <puts@plt>
lea    0x28(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    %rbp,%rdi
call   1040 <puts@plt>
lea    0x29(%rsp),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0x44(%rsp),%rsi
mov    %r12,%rdi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    (%rsp),%esi
lea    0xdcb(%rip),%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movsbl 0x4(%rsp),%esi
lea    0xdc9(%rip),%r12
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xdca(%rip),%rbx
mov    %rbx,%rdi
lea    0x5(%rsp),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
movss  0x20(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdbc(%rip),%rbp
mov    %rbp,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x24(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movsbl 0x28(%rsp),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
movss  0x44(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbp,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.Account = type { i32, i8, [25 x i8], float }
@.str = [22 x i8] c"Enter the account no\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [25 x i8] c"Enter the account type=\0A\00"
@.str.3 = [3 x i8] c"%s\00"
@.str.4 = [17 x i8] c"Enter the name=\0A\00"
@.str.5 = [16 x i8] c"Enter balance=\0A\00"
@.str.6 = [20 x i8] c"Account number: %d\0A\00"
@.str.7 = [18 x i8] c"Account Type: %s\0A\00"
@.str.8 = [18 x i8] c"Account Name: %s\0A\00"
@.str.9 = [21 x i8] c"Account Balance: %d\0A\00"
@.str.10 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %2
%6 = load i32, i32* %2
%7 = zext i32 %6 to i64
%8 = call i8* @llvm.stacksave()
store i8* %8, i8** %3
%9 = alloca %struct.Account, i64 %7
store i64 %7, i64* %4
store i32 0, i32* %5
br label %10
10: ; preds = %39, %0
%11 = load i32, i32* %5
%12 = load i32, i32* %2
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %42
14: ; preds = %10
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds %struct.Account, %struct.Account* %9, i64 %17
%19 = getelementptr inbounds %struct.Account, %struct.Account* %18, i32 0, i32 0
%20 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %19)
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%22 = load i32, i32* %5
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds %struct.Account, %struct.Account* %9, i64 %23
%25 = getelementptr inbounds %struct.Account, %struct.Account* %24, i32 0, i32 1
%26 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %25)
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%28 = load i32, i32* %5
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds %struct.Account, %struct.Account* %9, i64 %29
%31 = getelementptr inbounds %struct.Account, %struct.Account* %30, i32 0, i32 2
%32 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), [25 x i8]* %31)
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0))
%34 = load i32, i32* %5
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds %struct.Account, %struct.Account* %9, i64 %35
%37 = getelementptr inbounds %struct.Account, %struct.Account* %36, i32 0, i32 3
%38 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %37)
br label %39
39: ; preds = %14
%40 = load i32, i32* %5
%41 = add nsw i32 %40, 1
store i32 %41, i32* %5
br label %10
42: ; preds = %10
store i32 0, i32* %5
br label %43
43: ; preds = %75, %42
%44 = load i32, i32* %5
%45 = load i32, i32* %2
%46 = icmp slt i32 %44, %45
br i1 %46, label %47, label %78
47: ; preds = %43
%48 = load i32, i32* %5
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds %struct.Account, %struct.Account* %9, i64 %49
%51 = getelementptr inbounds %struct.Account, %struct.Account* %50, i32 0, i32 0
%52 = load i32, i32* %51
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i32 %52)
%54 = load i32, i32* %5
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds %struct.Account, %struct.Account* %9, i64 %55
%57 = getelementptr inbounds %struct.Account, %struct.Account* %56, i32 0, i32 1
%58 = load i8, i8* %57
%59 = sext i8 %58 to i32
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0), i32 %59)
%61 = load i32, i32* %5
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds %struct.Account, %struct.Account* %9, i64 %62
%64 = getelementptr inbounds %struct.Account, %struct.Account* %63, i32 0, i32 2
%65 = getelementptr inbounds [25 x i8], [25 x i8]* %64, i64 0, i64 0
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i8* %65)
%67 = load i32, i32* %5
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds %struct.Account, %struct.Account* %9, i64 %68
%70 = getelementptr inbounds %struct.Account, %struct.Account* %69, i32 0, i32 3
%71 = load float, float* %70
%72 = fpext float %71 to double
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), double %72)
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
br label %75
75: ; preds = %47
%76 = load i32, i32* %5
%77 = add nsw i32 %76, 1
store i32 %77, i32* %5
br label %43
78: ; preds = %43
%79 = load i8*, i8** %3
%80 = load i32, i32* %1
ret i32 %80
}

LLVM IR (-O2):
%struct.Account = type { i32, i8, [25 x i8], float }
@.str.1 = [3 x i8] c"%d\00"
@.str.3 = [3 x i8] c"%s\00"
@.str.6 = [20 x i8] c"Account number: %d\0A\00"
@.str.7 = [18 x i8] c"Account Type: %s\0A\00"
@.str.8 = [18 x i8] c"Account Name: %s\0A\00"
@.str.9 = [21 x i8] c"Account Balance: %d\0A\00"
@str = [21 x i8] c"Enter the account no\00"
@str.11 = [24 x i8] c"Enter the account type=\00"
@str.12 = [16 x i8] c"Enter the name=\00"
@str.13 = [15 x i8] c"Enter balance=\00"
define i32 @main() {
%1 = alloca [2 x %struct.Account]
%2 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%3 = getelementptr inbounds [2 x %struct.Account], [2 x %struct.Account]* %1, i64 0, i64 0, i32 0
%4 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%5 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.11, i64 0, i64 0))
%6 = getelementptr inbounds [2 x %struct.Account], [2 x %struct.Account]* %1, i64 0, i64 0, i32 1
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %6)
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.12, i64 0, i64 0))
%9 = getelementptr inbounds [2 x %struct.Account], [2 x %struct.Account]* %1, i64 0, i64 0, i32 2
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), [25 x i8]* %9)
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.13, i64 0, i64 0))
%12 = getelementptr inbounds [2 x %struct.Account], [2 x %struct.Account]* %1, i64 0, i64 0, i32 3
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %12)
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%15 = getelementptr inbounds [2 x %struct.Account], [2 x %struct.Account]* %1, i64 0, i64 1, i32 0
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %15)
%17 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.11, i64 0, i64 0))
%18 = getelementptr inbounds [2 x %struct.Account], [2 x %struct.Account]* %1, i64 0, i64 1, i32 1
%19 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %18)
%20 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.12, i64 0, i64 0))
%21 = getelementptr inbounds [2 x %struct.Account], [2 x %struct.Account]* %1, i64 0, i64 1, i32 2
%22 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), [25 x i8]* %21)
%23 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.13, i64 0, i64 0))
%24 = getelementptr inbounds [2 x %struct.Account], [2 x %struct.Account]* %1, i64 0, i64 1, i32 3
%25 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %24)
%26 = load i32, i32* %3
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i32 %26)
%28 = load i8, i8* %6
%29 = sext i8 %28 to i32
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0), i32 %29)
%31 = getelementptr inbounds [2 x %struct.Account], [2 x %struct.Account]* %1, i64 0, i64 0, i32 2, i64 0
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i8* %31)
%33 = load float, float* %12
%34 = fpext float %33 to double
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), double %34)
%36 = call i32 @putchar(i32 10)
%37 = load i32, i32* %15
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i32 %37)
%39 = load i8, i8* %18
%40 = sext i8 %39 to i32
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0), i32 %40)
%42 = getelementptr inbounds [2 x %struct.Account], [2 x %struct.Account]* %1, i64 0, i64 1, i32 2, i64 0
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i8* %42)
%44 = load float, float* %24
%45 = fpext float %44 to double
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), double %45)
%47 = call i32 @putchar(i32 10)
ret i32 0
}