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



what is the difference between : func (int list[], ...) or func (int *list , ....) - what is the ..

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

what is the difference between : func (int list[], ...) or func (int *list , ....) - what is the ..

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

Post New Answer

More C Interview Questions

every function has return the value?

1 Answers  


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)

1 Answers  


Can the size of an array be declared at runtime?

0 Answers  


What is an volatile variable?

15 Answers   HP,


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(); }

8 Answers   ADITI, Adobe,






What is printf () in c?

0 Answers  


write a program without using main function?

2 Answers   TCS,


What is spark map function?

0 Answers  


Why does not c have an exponentiation operator?

0 Answers  


What is wrong with this code?

0 Answers  


What is a c token and types of c tokens?

0 Answers  


how to swap two nubers by using a function with pointers?

1 Answers  


Categories