Question

Consider the following C code snippet:     #include     void printPattern(int
n) {         if (n <= 0) {             return;         }         printf("%d ",
n);         printPattern(n - 1);         printf("%d ",
n);     }     int main() {         printPattern(3);         printf("\n");         return 0;     }     What will be the output of the printPattern(3) function call?

A 3 2 1
B 1 2 3
C 3 2 1 1 2 3
D 3 2 1 0 1 2 3
E 1 2 3 3 2 1
Practice Next

Hey! Ask a query

🎓
Think You're Ready for RBI Grade B?
RBI Grade B 2026 Phase 1 Memory Based Paper
  • 200 Questions with Detailed Solutions
  • Section-wise Coverage (GA, English, Quant & Reasoning)