Output of following program
(A) Compiler Error
(B) 20 10
(C) 20 20
(D) 10 10
Explanation: In C, array parameters are treated as pointers (See https://www.geeksforgeeks.org/why-c-treats-array-parameters-as-pointers/ for details).
So the variable arr represents an array in main(), but a pointer in fun().
Quiz of this Question
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.