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 |
every function has return the value?
Display names and numbers of employees who have 5 years or more experience and salary less than Rs.15000 using array of structures (name, number, experience and salary)
Can the size of an array be declared at runtime?
What is an volatile variable?
What is the output of the following program #include<stdio.h> main() { int i=0; fork(); printf("%d",i++); fork(); printf("%d",i++); fork(); wait(); }
What is printf () in c?
write a program without using main function?
What is spark map function?
Why does not c have an exponentiation operator?
What is wrong with this code?
What is a c token and types of c tokens?
how to swap two nubers by using a function with pointers?