What will happen if in a C program you assign a value to an array element whose

Home | Discussion Forum
Taiyari24Hour

What will happen if in a C program you assign a value to an array element whose subscript exceeds the size of array?



View More Related Question

2) What is the maximum number of dimensions an array in C may have?

3) What will be the output of the program ?

 #include<stdio.h>
void main()
{
int a[5] = {5, 1, 15, 20, 25};
int i, j, m;
i = ++a[1];
j = a[1]++;
m = a[i++];
printf("%d, %d, %d", i, j, m);
}

4) What will be the output of the following code?

void main()
{
int a[10];
printf("%d %d", a[-1], a[12]);
}

5) Size of the array need not be specified, when

UP Gk Online Test

taiyari24hour.com

Study 2 Online Says....
Kindly log in or signup.