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 does the following declaration mean?
int (*ptr)[10];

3) In C, if you pass an array as an argument to a function, what actually gets passed?

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

#include <stdio.h>
int main(void)
{
char p;
char buf[10] = {1, 2, 3, 4, 5, 6, 9, 8};
p = (buf + 1)[5];
printf("%d", p);
return 0;
}

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

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

UP Gk Online Test

taiyari24hour.com

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