C++ PROGRAMMING QUESTIONS AND SOLUTION
C++ PROGRAMMING QUESTIONS AND SOLUTION
9. What is stored in list after the following C++ code executes?
int list[10]; list[0] = 2; list[1] = 3; for (int i = 2; i < 10; i++) { list[i] = list[i - 1] + list[i - 2]; if (i > 7) list[i] = 2 * list[i] - list[i - 2]; }
19. What is the output of the following C++ code?
#include using namespace std; int main() { int beta[7] = {3, 5}; for (int i = 2; i < 7; i++) { beta[i] = 3 * i +…
View On WordPress













