0 votes 0 votes please tell how to solve it? Aakash1125 asked Apr 19, 2017 Aakash1125 551 views answer comment Share Follow See all 5 Comments See all 5 5 Comments reply Show 2 previous comments Arjun commented Apr 20, 2017 reply Follow Share If you are coding them, why not add question as text? 1 votes 1 votes AnilGoudar commented Apr 20, 2017 reply Follow Share Hi Aakash1125, Output will be - 10,1 You are correct that In C, array name represents address and when we pass an array. Note: When we pass like that, we actually pass address and the parameter receiving function always accepts them as pointers. The foo() function can also be written like this, void foo(int *p) { int i=10 p = &i; printf("%d ", p[0]); } The pointer "p" will point to array initially, when we pass to function. But when the statement, p=&i; executes, now "p" will point to the variable i. so it would be like, 2 votes 2 votes Aakash1125 commented Apr 20, 2017 reply Follow Share thank you sir. I did not know (Note: When we pass like that, we actually pass address and the parameter receiving function always accepts them as pointers.)but now I feel at home with this concept... :) 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes hope it helps...... akash.dinkar12 answered Apr 20, 2017 akash.dinkar12 comment Share Follow See 1 comment See all 1 1 comment reply Aakash1125 commented Apr 20, 2017 reply Follow Share great,,,, thank you 0 votes 0 votes Please log in or register to add a comment.