Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7189525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:19:15+00:00 2026-05-28T19:19:15+00:00

I know {} are used to separate entities such as functions, classes and conditional

  • 0

I know {} are used to separate entities such as functions, classes and conditional branching, but what other use would they have here?

#import <stdio.h>

int main(void) {
    {{{
        printf("main\n");
    }}}
    return 0;
}

EDIT:

I found that it may be useful primarily for information hiding, along with nested functions. From the answers below it would seem they can be used as a marker during debugging and be removed in the release, but that this should not be endorsed.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T19:19:16+00:00Added an answer on May 28, 2026 at 7:19 pm

    Enclosing a code in braces { } creates an Scope.
    Creating an local scope can have number of reasons like:

    • Allows you to reuse a variable name in enclosing scope.
    • Define variables in middle of function.
      Creating variables anywhere except at the start of an scope was not allowed in c89, but it is allowed since c99.

    Online Example Code Sample:

    #include<stdio.h>
    
    int main()
    {
        int i = 10;
        {
             int i = 5;
             printf("i is [%d]\n",i);
        }
        printf("i is [%d]\n",i);
    
        return 0; 
    }
    

    In your example code,
    the extra { & } do not serve any purpose, they are just redundant code.

    As @Martin suggests in comments, since enclosing code in {{{ & }}} is just similar to { & }, it might be used as an tag/pattern for easy search.

    However, Personally, I would prefer adding appropriate comment to the code with an keyword which would show up in search rather than add such redundant code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have used cakePHP 1.2 and know how to use behaviors in it. using
I know it is commonly used as a lock object, but is that really
I know that the session is used for the database in Hibernate, but what
I have used Spring before but I am no expert and only used it
I'm fascinated by the CAPTCHA system used on SO... I would like to know
I have not used a UIScrollView before, and I just wanted to know how
I have never used SVN, but am familiar with some SM (source safe a
I know this questions probably been used and abused.... but i keep seeing conflicting
I've never used version control before but I know it's a good practice, so
I have used Codeigniter for several years and now use it with Modular Extensions

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.