What is the output of this program?
1. #include2. using namespace std; 3. int main() 4. { 5. int array[] = {10, 20, 30}; 6. cout << -2[array]; 7. return 0; 8. }
What is the output of this program?
1. #include2. using namespace std; 3. int main() 4. { 5. char str[5] = "ABC"; 6. cout << str[3]; 7. cout << str; 8. return 0; 9. }
What is the output of this program?
1. #include2. using namespace std; 3. int main() 4. { 5. int a = 5, b = 10, c = 15; 6. int arr[3] = {&a, &b, &c}; 7. cout << *arr[*arr[1] - 8]; 8. return 0; 9. }
What will be the output of the this program?
1. #include2. using namespace std; 3. int main () 4. { 5. int array[] = {0, 2, 4, 6, 7, 5, 3}; 6. int n, result = 0; 7. for (n = 0; n < 8; n++) { 8. result += array[n]; 9. } 10. cout << result; 11. return 0; 12. }
What will be the output of this program?
1. #include2. using namespace std; 3. int array1[] = {1200, 200, 2300, 1230, 1543}; 4. int array2[] = {12, 14, 16, 18, 20}; 5. int temp, result = 0; 6. int main() 7. { 8. for (temp = 0; temp < 5; temp++) { 9. result += array1[temp]; 10. } 11. for (temp = 0; temp < 4; temp++) { 12. result += array2[temp]; 13. } 14. cout << result; 15. return 0; 16. }