What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 131 Stack Exchange communities.

How do I put in a block of C code into my posts?
Is there some kind of formatting trick in the textarea of the post that needs to be done in order for it to show up properly?

share|improve this question
1  
asking clear question does not easy make –  fretje Dec 28 '09 at 11:25
2  
Yoda? Is it you? –  Adriano Varoli Piazza Dec 28 '09 at 12:19

1 Answer 1

int main() 
{
    printf("please clarify what you mean");
    return 0;
}

Or more specifically, you just indent with 4 spaces, or hit the "Code Sample" button, or press [Ctrl]+[K].

share|improve this answer
2  
Segmentation fault. –  alex Dec 28 '09 at 13:44
    
You forgot the newline, and using a variadic function such as printf() without a prototype in scope leads to undefined behaviour; using puts() avoids those problems. –  Jonathan Leffler Dec 29 '09 at 18:42

You must log in to answer this question.