Computer Sciences > Gate 2019 > Recursion
Consider the following C program:

#include<stdio.h>
int r(){
    int static num=7;
    return num--;
}
int main() {
    for(r();r();r()) {
    printf("%d ",r());
};
    return 0;
}
Which one of the following values will be displayed on execution of the programs?
A
41
B
52
C
63
D
630

Explanation

Correct : b

Similar Questions

What is the worst-case time complexity of insertion in an AVL tree?
Question #23 Medium
Which operations on a binary search tree have O(h) complexity?
Question #31 Easy
Compare search complexities of sorted array vs balanced BST.
Question #47 Hard

Related Topics

Data Structures Binary Search Tree Time Complexity Algorithm Analysis Tree Algorithms Computer Science