int main(void) {
  int ans, i;
  char menu[][50] = {"Find area of rectangle",
                     "Find ASCII Value of a character",
                     "Convert Celsius to Farenheit",
                     "Swap value of two variable",
                     "Check the given number is odd or even",
                     "Check whether a character is vowel or consonant",
                     "Find the largest among three number",
                     "Leap year checking",
                     "Positive negative checking",
                     "Quadratic equation"};
  do {
    clrscr();
    printf("\033[1;35mC_Program_List\n");
    for (i = 0; i < 10; i++) {
      printf("\033[1;34m[%d] - [%s]\n", i + 1, menu[i]);
    }
    printf("\033[1;31m[%d] - [Exit]\033[37m\n> ", i + 1);
    scanf("%d", &ans);
    switch (ans) {
    case 1:
      g_areaOfRect();
      break;
    case 2:
      g_ascii();
      break;
    case 3:
      g_ctof();
      break;
    case 4:
      g_swap();
      break;
    case 5:
      g_oddeven();
      break;
    case 6:
      g_vowelconsonant();
      break;
    case 7:
      g_findLargest();
      break;
    case 8:
      g_leapYear();
      break;
    case 9:
      g_posneg();
      break;
    case 10:
      g_quadratic();
      break;
    case 11:
      exit(0);
      break;
    default:
      printf("Please enter appropriate choice!");
    }
  } while (ans != i + 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x200(%rbp),%rdi
lea    0xe20(%rip),%rsi
mov    $0x1f4,%edx
call   10a0 <memcpy@plt>
mov    $0x0,%al
call   1050 <clrscr@plt>
lea    0xffc(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    1274 <main+0x84>
mov    -0xc(%rbp),%esi
add    $0x1,%esi
movslq -0xc(%rbp),%rax
lea    -0x200(%rbp),%rdx
imul   $0x32,%rax,%rax
add    %rax,%rdx
lea    0xfdc(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1236 <main+0x46>
mov    -0xc(%rbp),%esi
add    $0x1,%esi
lea    0xfce(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x209(%rbp)
call   1070 <printf@plt>
mov    -0x209(%rbp),%al
lea    0xfd1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   10d0 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x208(%rbp)
sub    $0xa,%eax
ja     1352 <main+0x162>
mov    -0x208(%rbp),%rax
lea    0xd36(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x0,%al
call   10c0 <g_areaOfRect@plt>
jmp    1360 <main+0x170>
mov    $0x0,%al
call   1080 <g_ascii@plt>
jmp    1360 <main+0x170>
mov    $0x0,%al
call   10e0 <g_ctof@plt>
jmp    1360 <main+0x170>
mov    $0x0,%al
call   10b0 <g_swap@plt>
jmp    1360 <main+0x170>
mov    $0x0,%al
call   1110 <g_oddeven@plt>
jmp    1360 <main+0x170>
mov    $0x0,%al
call   1030 <g_vowelconsonant@plt>
jmp    1360 <main+0x170>
mov    $0x0,%al
call   1090 <g_findLargest@plt>
jmp    1360 <main+0x170>
mov    $0x0,%al
call   1060 <g_leapYear@plt>
jmp    1360 <main+0x170>
mov    $0x0,%al
call   10f0 <g_posneg@plt>
jmp    1360 <main+0x170>
mov    $0x0,%al
call   1040 <g_quadratic@plt>
jmp    1360 <main+0x170>
xor    %edi,%edi
call   1100 <exit@plt>
lea    0xf16(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
jmp    1365 <main+0x175>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jne    121a <main+0x2a>
xor    %eax,%eax
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x208,%rsp
lea    0xe18(%rip),%rsi
lea    0x10(%rsp),%rdi
mov    $0x1f4,%edx
call   10b0 <memcpy@plt>
lea    0x104b(%rip),%rbx
lea    0xfef(%rip),%rbp
lea    0xffc(%rip),%r14
lea    0x1012(%rip),%r15
lea    0xc(%rsp),%r12
lea    0xdb1(%rip),%r13
jmp    126b <main+0x6b>
lea    0x1000(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
nop
cmpl   $0xb,0xc(%rsp)
je     1405 <main+0x205>
xor    %eax,%eax
call   1050 <clrscr@plt>
mov    %rbx,%rdi
call   1060 <puts@plt>
mov    %rbp,%rdi
mov    $0x1,%esi
lea    0x10(%rsp),%rdx
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rbp,%rdi
mov    $0x2,%esi
lea    0x42(%rsp),%rdx
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rbp,%rdi
mov    $0x3,%esi
lea    0x74(%rsp),%rdx
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rbp,%rdi
mov    $0x4,%esi
lea    0xa6(%rsp),%rdx
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rbp,%rdi
mov    $0x5,%esi
lea    0xd8(%rsp),%rdx
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rbp,%rdi
mov    $0x6,%esi
lea    0x10a(%rsp),%rdx
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rbp,%rdi
mov    $0x7,%esi
lea    0x13c(%rsp),%rdx
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rbp,%rdi
mov    $0x8,%esi
lea    0x16e(%rsp),%rdx
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rbp,%rdi
mov    $0x9,%esi
lea    0x1a0(%rsp),%rdx
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rbp,%rdi
mov    $0xa,%esi
lea    0x1d2(%rsp),%rdx
xor    %eax,%eax
call   1080 <printf@plt>
mov    %r14,%rdi
mov    $0xb,%esi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   10e0 <scanf@plt>
mov    0xc(%rsp),%eax
add    $0xffffffff,%eax
cmp    $0xa,%eax
ja     1251 <main+0x51>
movslq 0x0(%r13,%rax,4),%rax
add    %r13,%rax
jmp    *%rax
xor    %eax,%eax
call   10d0 <g_areaOfRect@plt>
jmp    1260 <main+0x60>
xor    %eax,%eax
call   1090 <g_ascii@plt>
jmp    1260 <main+0x60>
xor    %eax,%eax
call   10f0 <g_ctof@plt>
jmp    1260 <main+0x60>
xor    %eax,%eax
call   10c0 <g_swap@plt>
jmp    1260 <main+0x60>
xor    %eax,%eax
call   1120 <g_oddeven@plt>
jmp    1260 <main+0x60>
xor    %eax,%eax
call   1030 <g_vowelconsonant@plt>
jmp    1260 <main+0x60>
xor    %eax,%eax
call   10a0 <g_findLargest@plt>
jmp    1260 <main+0x60>
xor    %eax,%eax
call   1070 <g_leapYear@plt>
jmp    1260 <main+0x60>
xor    %eax,%eax
call   1100 <g_posneg@plt>
jmp    1260 <main+0x60>
xor    %eax,%eax
call   1040 <g_quadratic@plt>
jmp    1260 <main+0x60>
xor    %eax,%eax
add    $0x208,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %edi,%edi
call   1110 <exit@plt>

LLVM IR (-O0):
@__const.main.menu = [10 x [50 x i8]] [[50 x i8] c"Find area of rectangle\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [50 x i8] c"Find ASCII Value of a character\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [50 x i8] c"Convert Celsius to Farenheit\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [50 x i8] c"Swap value of two variable\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [50 x i8] c"Check the given number is odd or even\00\00\00\00\00\00\00\00\00\00\00\00\00", [50 x i8] c"Check whether a character is vowel or consonant\00\00\00", [50 x i8] c"Find the largest among three number\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [50 x i8] c"Leap year checking\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [50 x i8] c"Positive negative checking\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [50 x i8] c"Quadratic equation\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"]
@.str = [23 x i8] c"\1B[1;35mC_Program_List\0A\00"
@.str.1 = [20 x i8] c"\1B[1;34m[%d] - [%s]\0A\00"
@.str.2 = [29 x i8] c"\1B[1;31m[%d] - [Exit]\1B[37m\0A> \00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [33 x i8] c"Please enter appropriate choice!\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [10 x [50 x i8]]
store i32 0, i32* %1
%5 = bitcast [10 x [50 x i8]]* %4 to i8*
br label %6
6: ; preds = %53, %0
%7 = call i32 (...) @clrscr()
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %9
9: ; preds = %20, %6
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 10
br i1 %11, label %12, label %23
12: ; preds = %9
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [10 x [50 x i8]], [10 x [50 x i8]]* %4, i64 0, i64 %16
%18 = getelementptr inbounds [50 x i8], [50 x i8]* %17, i64 0, i64 0
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %14, i8* %18)
br label %20
20: ; preds = %12
%21 = load i32, i32* %3
%22 = add nsw i32 %21, 1
store i32 %22, i32* %3
br label %9
23: ; preds = %9
%24 = load i32, i32* %3
%25 = add nsw i32 %24, 1
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %25)
%27 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %2)
%28 = load i32, i32* %2
switch i32 %28, label %50 [
i32 1, label %29
i32 2, label %31
i32 3, label %33
i32 4, label %35
i32 5, label %37
i32 6, label %39
i32 7, label %41
i32 8, label %43
i32 9, label %45
i32 10, label %47
i32 11, label %49
]
29: ; preds = %23
%30 = call i32 (...) @g_areaOfRect()
br label %52
31: ; preds = %23
%32 = call i32 (...) @g_ascii()
br label %52
33: ; preds = %23
%34 = call i32 (...) @g_ctof()
br label %52
35: ; preds = %23
%36 = call i32 (...) @g_swap()
br label %52
37: ; preds = %23
%38 = call i32 (...) @g_oddeven()
br label %52
39: ; preds = %23
%40 = call i32 (...) @g_vowelconsonant()
br label %52
41: ; preds = %23
%42 = call i32 (...) @g_findLargest()
br label %52
43: ; preds = %23
%44 = call i32 (...) @g_leapYear()
br label %52
45: ; preds = %23
%46 = call i32 (...) @g_posneg()
br label %52
47: ; preds = %23
%48 = call i32 (...) @g_quadratic()
br label %52
49: ; preds = %23
unreachable
50: ; preds = %23
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0))
br label %52
52: ; preds = %50, %47, %45, %43, %41, %39, %37, %35, %33, %31, %29
br label %53
53: ; preds = %52
%54 = load i32, i32* %2
%55 = load i32, i32* %3
%56 = add nsw i32 %55, 1
%57 = icmp ne i32 %54, %56
br i1 %57, label %6, label %58
58: ; preds = %53
ret i32 0
}

LLVM IR (-O2):
@__const.main.menu = [10 x [50 x i8]] [[50 x i8] c"Find area of rectangle\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [50 x i8] c"Find ASCII Value of a character\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [50 x i8] c"Convert Celsius to Farenheit\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [50 x i8] c"Swap value of two variable\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [50 x i8] c"Check the given number is odd or even\00\00\00\00\00\00\00\00\00\00\00\00\00", [50 x i8] c"Check whether a character is vowel or consonant\00\00\00", [50 x i8] c"Find the largest among three number\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [50 x i8] c"Leap year checking\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [50 x i8] c"Positive negative checking\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [50 x i8] c"Quadratic equation\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"]
@.str.1 = [20 x i8] c"\1B[1;34m[%d] - [%s]\0A\00"
@.str.2 = [29 x i8] c"\1B[1;31m[%d] - [Exit]\1B[37m\0A> \00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [33 x i8] c"Please enter appropriate choice!\00"
@str = [22 x i8] c"\1B[1;35mC_Program_List\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x [50 x i8]]
%3 = bitcast i32* %1 to i8*
%4 = getelementptr inbounds [10 x [50 x i8]], [10 x [50 x i8]]* %2, i64 0, i64 0, i64 0
%5 = getelementptr inbounds [10 x [50 x i8]], [10 x [50 x i8]]* %2, i64 0, i64 1, i64 0
%6 = getelementptr inbounds [10 x [50 x i8]], [10 x [50 x i8]]* %2, i64 0, i64 2, i64 0
%7 = getelementptr inbounds [10 x [50 x i8]], [10 x [50 x i8]]* %2, i64 0, i64 3, i64 0
%8 = getelementptr inbounds [10 x [50 x i8]], [10 x [50 x i8]]* %2, i64 0, i64 4, i64 0
%9 = getelementptr inbounds [10 x [50 x i8]], [10 x [50 x i8]]* %2, i64 0, i64 5, i64 0
%10 = getelementptr inbounds [10 x [50 x i8]], [10 x [50 x i8]]* %2, i64 0, i64 6, i64 0
%11 = getelementptr inbounds [10 x [50 x i8]], [10 x [50 x i8]]* %2, i64 0, i64 7, i64 0
%12 = getelementptr inbounds [10 x [50 x i8]], [10 x [50 x i8]]* %2, i64 0, i64 8, i64 0
%13 = getelementptr inbounds [10 x [50 x i8]], [10 x [50 x i8]]* %2, i64 0, i64 9, i64 0
br label %14
14: ; preds = %53, %0
%15 = call i32 (...) @clrscr()
%16 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 1, i8* %4)
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 2, i8* %5)
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 3, i8* %6)
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 4, i8* %7)
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 5, i8* %8)
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 6, i8* %9)
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 7, i8* %10)
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 8, i8* %11)
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 9, i8* %12)
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 10, i8* %13)
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 11)
%28 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %1)
%29 = load i32, i32* %1
switch i32 %29, label %51 [
i32 1, label %30
i32 2, label %32
i32 3, label %34
i32 4, label %36
i32 5, label %38
i32 6, label %40
i32 7, label %42
i32 8, label %44
i32 9, label %46
i32 10, label %48
i32 11, label %50
]
30: ; preds = %14
%31 = call i32 (...) @g_areaOfRect()
br label %53
32: ; preds = %14
%33 = call i32 (...) @g_ascii()
br label %53
34: ; preds = %14
%35 = call i32 (...) @g_ctof()
br label %53
36: ; preds = %14
%37 = call i32 (...) @g_swap()
br label %53
38: ; preds = %14
%39 = call i32 (...) @g_oddeven()
br label %53
40: ; preds = %14
%41 = call i32 (...) @g_vowelconsonant()
br label %53
42: ; preds = %14
%43 = call i32 (...) @g_findLargest()
br label %53
44: ; preds = %14
%45 = call i32 (...) @g_leapYear()
br label %53
46: ; preds = %14
%47 = call i32 (...) @g_posneg()
br label %53
48: ; preds = %14
%49 = call i32 (...) @g_quadratic()
br label %53
50: ; preds = %14
unreachable
51: ; preds = %14
%52 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0))
br label %53
53: ; preds = %30, %32, %34, %36, %38, %40, %42, %44, %46, %48, %51
%54 = load i32, i32* %1
%55 = icmp eq i32 %54, 11
br i1 %55, label %56, label %14
56: ; preds = %53
ret i32 0
}