LogiQuest
Back to Functions
5

What will be the output of the program?

#include <stdio.h>
int fact(int n) { return n <= 1 ? 1 : n * fact(n - 1); }
int main(void) {
    printf("%d\n", fact(6));
    return 0;
}
Easy

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.