what is the difference between : func (int list[], ...) or
func (int *list , ....) - what is the difference if list is an array and if also if list is a pointer
Answers were Sorted based on User's Feedback
Answer / vimal
Nothing,because ultimately pointer to the first element of
array is send to the function,therefore using both method
changes made in called function will affect the calling
function. In one first you indirectly reference the pointer
and in other you directly reference the pointer.
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / guest
in func(int list[]: it gives only the address of the value
which was stored in the list.
func (int *list , ....):it gives the value which is stored
in the list
| Is This Answer Correct ? | 0 Yes | 3 No |
how to write a program which adds two numbers without using semicolon in c
What is a function in c?
What are the different file extensions involved when programming in C?
Why does the call char scanf work?
how to write palindrome program?
What does %d do in c?
How can we open a file in Binary mode and Text mode?what is the difference?
How to avoid buffer overflow?
How to write the code of the program to swap two numbers with in one statement?
What is Heap?
Can we compile a program without main() function?
write a program to print largest number of each row of a 2D array