31. | Which of the following statements are correct about the program below? #include
int main()
{
int size, i;
scanf("%d", &size);
int arr[size];
for(i=1; i<=size; i++)
{
scanf("%d", arr[i]);
printf("%d", arr[i]);
}
return 0;
}
|
|||||||
|
32. | What is the output of this program? #include
using namespace std;
int main()
{
int a = 5, b = 10, c = 15;
int arr[3] = {&a, &b, &c};
cout << *arr[*arr[1] - 8];
return 0;
}
|
|||||||
|
33. | What is the output of this program? #include
using namespace std;
int main()
{
char str[5] = "ABC";
cout << str[3];
cout << str;
return 0;
}
|
|||||||
|
34. | int testarray[3][2][2] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
What value does testarray[2][1][0] in the sample code above contain?
|
|||||||
|
35. | What is the output of this program? #include
using namespace std;
int main()
{
int array[] = {10, 20, 30};
cout << -2[array];
return 0;
}
|
|||||||
|
36. | An array a[8] will store how many values ? |
|||||||
|
« previous
1
2
3
4
5
6
7
8
9
...next »