Related to procedural calls and assembly language
I was going through some concepts of C when I came across this:

    int add (int a, int b)
    {
    return a+b;
    }

    int main()
    {
    int a,b;
    a = 3;
    b = 4;
    int ret = add(a,b);
    printf("Result: %u\n", ret);
    exit(0);
    }

The assembler code generated for it as follows:

    <main>:

    1: push ebp

    2: mov ebp, esp

    3: sub esp, 0x18

    4: mov eax, 0x0

.........(some more code but not relevant to the question)

The question I want to ask is why in the 3rd step value of stack pointer(esp) decreased by 24(0x18).  
Related to procedural calls and assembly language
===

I was going through some concepts of C when I came across this:

    int add (int a, int b)
    {
    return a+b;
    }

    int main()
    {
    int a,b;
    a = 3;
    b = 4;
    int ret = add(a,b);
    printf("Result: %u\n", ret);
    exit(0);
    }

The assembler code generated for it as follows:

    <main>:

    1: push ebp

    2: mov ebp, esp

    3: sub esp, 0x18

    4: mov eax, 0x0

.........(some more code but not relevant to the question)

The question I want to ask is why in the 3rd step value of stack pointer(esp) decreased by 24(0x18).  