How do I format my code blocks?
I'm newbie to Stack Overflow as well as programming. I just wanted to know what is the best way to attach a code to a question.
I know that indenting by 4 spaces treats a line as code .. but if I have a block of code then its becoming a pain to indent each and every line by four spaces. Blocking a set and pressing tab also does not seem to work. I know that I'm missing something here.
Just wanted experienced users to shed some light on this.