Q.1
What will be the output of the program ?
#include<stdio.h>
int main()
{
    int arr[1] = {10};
    printf("%d", 0[arr]);
    return 0;
}
Q.2
Size of the array need not be specified, when
Q.3
What will be the output of the following program?
void main()
{
      char str1[] = "abcd";
      char str2[] = "abcd";
      if(str1==str2)
            printf("Equal");
      else
            printf("Unequal");
}
Q.4
What will be the output of the program if the array begins at address 65486?
#include
void main()
{
    int arr[] = {12, 14, 15, 23, 45};
    printf("%u, %u", arr, &arr);
}
Q.5
What will be the output of the program ?
#include
void main()
{
    float arr[] = {12.4, 2.3, 4.5, 6.7};
    printf("%d", sizeof(arr)/sizeof(arr[0]));
}
Q.6
Which of the following is correct way to define the function fun() in the below program?
#include<stdio.h>
void main()
{
    int a[3][4];
    fun(a);
}
Q.7
Which of the following statements are correct about the program below?
#include<stdio.h>
void main()
{
    int size, i;
    scanf("%d", &size);
    int arr[size];
    for(i=1; i<=size; i++)
    {
        scanf("%d", arr[i]);
        printf("%d", arr[i]);
    }
}
Q.8
Which of the following statements are correct about an array?
1. The array int num[26]; can store 26 elements.
2. The expression num[1] designates the very first element in the array.
3. It is necessary to initialize the array at the time of declaration.
4. The declaration num[SIZE] is allowed if SIZE is a macro.
0 h : 0 m : 1 s