What is my coding style called. Is there an emacs style for it?
I tend to write code like:

    void myfunc()
    {
    }
    
    if (statement){
        dostuff();
    } 
    else{
        dootherstuff();
    }
    
    switch (var){
        case 1: 
        {
            stuff();
        }
        break;
    
        case 2:
            stuff();
            break;
    };

Is there a formatting mode for this? what's it called?

If not, or there is one that is close to it, how do I modify my .emacs file to make it indent correctly?
What is my coding style called. Is there an emacs style for it?
===

I tend to write code like:

    void myfunc()
    {
    }
    
    if (statement){
        dostuff();
    } 
    else{
        dootherstuff();
    }
    
    switch (var){
        case 1: 
        {
            stuff();
        }
        break;
    
        case 2:
            stuff();
            break;
    };

Is there a formatting mode for this? what's it called?

If not, or there is one that is close to it, how do I modify my .emacs file to make it indent correctly?