GATEverse
← GATE CSE 2021 Set 1

Q48

NAT2 marks

Consider the following ANSI C\text{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\textsf{Z} be an array of 1010 elements with Z[i]=1\textsf{Z}[i]=1, for all ii such that 0≤i≤90 \leq i \leq 9. The value returned by SimpleFunction(Z,10,2)\textsf{SimpleFunction(Z},10,2) is __________

Sign in to save attempts.

Loading…