Saved Bookmarks
| 1. |
Predict the output of the following C++ program. #include <iostream.h>int main() { int array[] = {1, 2, 4, 6,7,5}; for (int n =1; n<=5; n++) array [n] = array [n – 1 ]; for (n = 0; n <= 5; n++) cout<< array [n]; return 0; } |
|
Answer» Answer is 1, 1, 1, 1, 1, 1 |
|