Debopriya Mitra
last month
Debopriyacountry asked

What is parenthesis?

Sudip Bhandari
Expert
last month

Good question!

In programming, parentheses (the rounded brackets ()) are used in different ways depending on the context.

Here are two common uses:

  • Grouping expressions to control the order of operations:
    Example:

    (5 + 19) / 6 * (2 + 5) 

    Parentheses make sure that the additions happen before division and multiplication.

  • Defining function calls and passing arguments:
    Example:

    // function definition
    int main() {
       ...
    }
    
    // Function call
    addNumbers(10, 5); 

    Here, parentheses are used to define and call functions, and to pass values into them.

You'll be using parentheses a lot as you continue learning to code, and it will start feeling more natural as you progress.
So I suggest you keep moving forward step-by-step.

Let me know if you have any more questions—happy to help!

C
This question was asked as part of the Learn C Programming course.