Multiple choice

If the input of the following program is 10, what will be the output? void print(int); void main() { int n; scanf(%d,&n); print(n); } void print(static int x) { int i; for(i=1;i<=x;i++) printf(%d,i); }

  1. 1 2 3 4 5 6 7 8 9 10

  2. 1 1 1 1 1 1 1 1 1 1

  3. 0 0 0 0 0 0 0 0 0 0

  4. Compile error

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Here storage class static is not allowed.