πŸ“Š C++
Q. Output of the this program will be _____
Code:
#include
using namespace std;
int main ()
{
int array[] = {0, 2, 4, 6, 7, 5, 3};
int n, result = 0;
for (n = 0 ;n < 8 ;n++) {
result += array[n];
}
cout << result;
return 0;
}
  • (A) 25
  • (B) 26
  • (C) 27
  • (D) None
πŸ’¬ Discuss
βœ… Correct Answer: (C) 27

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
206
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Tina Singh
Publisher
πŸ“ˆ
94%
Success Rate