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

Home | Discussion Forum
Taiyari24Hour

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



View More Related Question

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

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

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

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

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

4) Consider the following type definition.

typedef char x[10];
x myArray[5];

What will sizeof(myArray) be ? (Assume one character occupies 1 byte)

5) In C Programming, If we need to store word "INDIA" then syntax is as below –

UP Gk Online Test

taiyari24hour.com

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