Announcement Announcement Module
Collapse Forum Guidelines

Welcome to the Forums! The purpose of this forum is to allow you to discuss topics relating to hosting and topics of interest with other Customers. The primary focus should relate to issues not generally included in our Wiki or Control Panel, or information not provided by our Customer Support Team. Some examples include programming and coding support, web site design ideas and SEO practices.

The forum is not meant as a replacement to our Wiki or Customer Support. We highly recommend searching our Wiki before posting on the forum. Also, if you have a question for our Customer Support team, please contact them as you would normally.

We ask that if you have any complaints or questions relating specifically to your account, that you address them to our Customer Support department. Do not post personal account information such as passwords or other sensitive and private information the forum, as this type of information is best kept secret. Also, please be respectful of other users and refrain from defamatory comments or use of coarse language.

We will visit the forum from time to time, and contribute to various topics. We reserve the right to delete any posts which are deemed offensive or against the spirit of the forum. Any spamming or illegal activity will not be tolerated. We also reserve the right to block any user who violates these guidelines.

To get started, we welcome you to sign up at our User Management site. Any account created there will have access to these forums, our Wiki, our Ideas site and commenting permission on our Status Blog.
See more
See less
brackets in C programming Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • brackets in C programming

    How many different brackets are there in C programming, other than round and curly? And what is the main difference between round and curly brackets, anyhow?

  • #2
    ( ) round brackets (parentheses) = for function declarations/definitions/calls
    { } curly brackets (braces) = to group sections of code
    < > angle brackets for header files = for header files
    [ ] square brackets = for arrays


    • #3
      [] for arrays
      {} to group sections of code (like after an if statement)


      • #4
        You can apply code with brackets in c.

        #include <stdio.h>

        int main ( void )
        char c[15];
        int x;
        } table [ ] =
        { "Hello.", 1 },
        { "Do you", 22 },
        { "understand", 333 },
        { "all this", 4444 },
        { "yet?", 55555 },
        int x;

        for(x = 0; x <5; x++ )
        printf( "%s\t%d\n", table[x].c, table[x].x );

        printf( "< > and << >> are omitted because I'm tired of typing all this bold crap.\n" );

        return 0;


        • #5
          BODMAS is the rule used in C for opening a brackets.

          First Brackets will be Open then Of will be executed then Division will be performed then after Multiplication, Addition and Subtraction will be executed.