Skip to content

Beta · Data may be lost.Your data may be reset or lost.

GateBrew
← GATE CSE 2013
Questions

Q31

MCQ2 marks, −0.67AlgorithmsMedium

Consider the following function:

int unknown(int n){
    int i, j, k=0;
    for (i=n/2; i<=n; i++)
        for (j=2; j<=n; j=j*2)
            k = k + n/2;
    return (k);
}

The return value of the function is

Sign in to save attempts.

Solutions and discussion are hidden while you attempt this question. They open once you check or show the answer.