GATE 2021 CS Question Paper Complete Solution - PYQ 2021
Q 48. Consider the following ANSI C function:
int SimpleFunction(int Y[], int n, int x)
{
int total = Y[0], loopIndex;
for (loopIndex=1; loopIndex lt=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. The value returned by SimpleFunction(Z,10,2) is __________ .
---------------------------------------------------------------------------
GATE 2021 All links:https://gate.iitb.ac.in/G21/index.php
GATE 2021: Questions & Keys: https://gate.iitb.ac.in/G21/21_Final_...
CS Set 1:
QP: https://drive.google.com/file/d/1l0Wd...
Key: https://drive.google.com/file/d/1Yue4...
CS Set2:
QP: https://drive.google.com/file/d/1msqM...
Key: https://drive.google.com/file/d/19-3n...
------------------------------------------------------------------------
Gate Helpline helps you in gate notifications, PSU, previous year papers, gate admit card, gate cutoff marks, gate results, scorecard, gate helpline number etc Gate Helpline provides a unique feature of Question Answer Discussion.
--------------------------------------------------------------------------
Follow Us on Youtube Channel:
https://www.youtube.com/c/Gatehelplin...
Gate Helpline:
http://gatehelpline.com/
Follow Us on Facebook:
/ gatehelplinedotcom
Follow Us on Twitter:
/ gatehelpline