C-Programming-data-structure || 2021 MCQ || 2-mark || Module 1: C Programming

Last Updated :
Discuss
Comments

Consider the following ANSI C function :

int SimpleFunction(int Y[], int n, int x)

{

  int total = Y[0], loopIndex;

  for (loopIndex=1; loopIndex<= n –1; loopIndex++)

              total = x * total + y[loopIndex];

  return total;

}

Let Z be an array of 10 elements with Z[i]=1, for all i such that 0 <= i <=9

9. The value returned by SimpleFunction(Z, 10, 2) is _______ 2021 Set 1 || 2 MARKS || NAT

1023

Share your thoughts in the comments
Article Tags :