What is the output of the following code snippet? #i…
What is the output of the following code snippet? #include using namespace std; int mystery(int a[], int capacity); int main() { const int CAPACITY = 10; int numbers[CAPACITY]; int size = mystery(numbers, CAPACITY); for (int i = size – 1; i >= 0; i–) { cout 1) a[1] = 1; else return 1; int i = 2; while (i < capacity && a[i-1] < capacity) { a[i] = a[i - 1] + a[i - 2]; i++; } return i; }
Read Details