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

Home | Discussion Forum

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

1) What will be the output of the program ?

#include <stdio.h>
int main()
{
int arr[1] = {10};
printf("%d", 0[arr]);
return 0;
}

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

3) Array passed as an argument to a function is interpreted as

4) What will be printed after execution of the following code?

void main()
{
int arr[10] = {1,2,3,4,5};
printf("%d", arr[5]);
}

5) What will be the output of the program if the array begins at 65472 and each integer occupies 2 bytes?

#include <stdio.h>
void main()
{
int a[3][4] = {1, 2, 3, 4, 4, 3, 2, 1, 7, 8, 9, 0};
printf("%u, %u", a+1, &a+1);
}

UP Gk Online Test

taiyari24hour.com