📚 Question Bank Q90 — Programming and Data Structure
Tags
Programming and Data Structure
Q90. Marks: +2.0 UGC NET Paper 2: Computer Sc 23rd August 2024 Shift 1

Consider the following C code: .

#include < stdio.h >

int temp = 0;

int fun(int x, int y) {
    int z;
    temp++;

    if (y == 3) return(x * x * x);
    else {
        z = fun(x, y / 3);
        return(z * z * z);
    }
}

int main() {
    fun(4, 81);
    printf("%d", temp);
    return 0;
}

What will be the output of the above code ?

1.3
2.4 ✓ Correct
3.5
4.6
📄 All “Programming and Data Structure” questions across papers
🏷 Change Tag for this Question