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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:06:27+00:00 2026-05-30T11:06:27+00:00

I am having one c code. Where i had given an array index as

  • 0

I am having one c code.
Where i had given an array index as 12.But it is allowing me to initialize the array more to that index instead of giving error for index out of bound.
Can any one please explain me y it is happeining.

int vas1[12][12];
    vas1[15][15]=0;

    int i,j;
    for (i = 0; i < 15; i ++)
    {
        for (j = 0; j < 15; j ++) {
            printf("i=%d j=%d vas=%d",i,j,vas1[i][j]); 

        }
    }

printf("Success");

Thanks

  • 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-30T11:06:29+00:00Added an answer on May 30, 2026 at 11:06 am

    C doesn’t do bounds checking on array accesses. It simply marks illegal accesses as “undefined behavior” so each implementation can do as it please. Since using C means you know what you’re doing, C allows you to shoot yourself in the foot.

    In practice, sometimes you will get an error, sometimes not. Sometimes you won’t get an error but the client will. Worst case scenario: you won’t get an error but the program will behave really weird (variables changing values for no reason etc).

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

Sidebar

Related Questions

When designing tables, I've developed a habit of having one column that is unique
I am having trouble with the query in this code. The problem is one
We recently had a code review . One of my classes was used so
I am having one requirement for locking the entire dataset. Is it possible to
I am having one heck of a hard time trying to figure this out.
I am having one problem with the PHP json_encode function. It encodes numbers as
I am having one Gtk+ and C application in which i want to set
I'm having one hell of a time trying to get my databinding to work
I'm having one doubt about the VIM ENCRYPTION key . I having a text
I am having one GtkVbox and I am adding it to GtkViewPort . View

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.