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 8365259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:37:02+00:00 2026-06-09T12:37:02+00:00

Is that possible? I would be happy if someone can guide me where in

  • 0

Is that possible? I would be happy if someone can guide me where in the standard this is mentioned.

For me, it worked as I expect it to behave using MinGW. However, I want to know if this is standard or not. This is the code I tested:

#include <stdio.h>

int main(void) {

    int me[3][2] = {{1, 2}, 3, 4, 5, 6};
    int x = 0;

    while(x<6) printf("%d_", ((int*)me)[x]), ++x;

    return 0;

}

The output is: 1_2_3_4_5_6_.

  • 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-06-09T12:37:03+00:00Added an answer on June 9, 2026 at 12:37 pm

    Is that possible? I would be happy if someone can guide me where in
    the standard this is mentioned.

    I think it’s standard but I wouldn’t say I have definite proof.

    6.7.9

    If the aggregate or union contains elements or members that are
    aggregates or unions, these rules apply recursively to the
    subaggregates or contained unions. If the initializer of a
    subaggregate or contained union begins with a left brace, the
    initializers enclosed by that brace and its matching right brace
    initialize the elements or members of the subaggregate or the
    contained union. Otherwise, only enough initializers from the list are
    taken to account for the elements or members of the subaggregate or
    the first member of the contained union; any remaining initializers are
    left to initialize the next element or member of the aggregate of
    which the current subaggregate or contained union is a part.

    And later, although not specifically for arrays, it gives an example of inconsistently bracketed initialization:

    struct { int a[3], b; } w[] = { { 1 }, 2 };
    

    w[0].a[0] is 1 and w[1].a[0] is 2; all the other elements are zero

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

Sidebar

Related Questions

Would be possible to extend this kind of layout so that I can have
I'm using Visual Studio 2010 RC. Would it be possible that after doing my
Is it possible to create a program using AS3 that would allow the user
Would what mentioned in the title be possible? Python module style that is. See
I'm not sure if that is possible in C# but I would like to
Would it be possible to write a script that gave the user the ability
Would it be possible to add a new operator to the String class that
Would it be possible to write a wrapper or style simple_form so that form
Is it possible to assign to a list slice in one go, that would
I'm trying to come up with the largest possible group of friends that would

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.