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

Differentiate call by value and call by reference?

0 Answers   Cyient,


how can i print "hello"

3 Answers  


how to find a 5th bit is set in c program

4 Answers   IBM,


what are bit fields? What is the use of bit fields in a structure declaration?

0 Answers   Flextronics, TISL, Virtusa,


Do you know null pointer?

0 Answers  






#include<stdio.h> { printf("Hello"); } how compile time affects when we add additional header file <conio.h>.

0 Answers  


Blade logic interview question. 1st round is a written tests with 15 multiple questions from c and c++. All are simple basic question. Like int main () { Int i=65; Return printf(ā€œ%cā€, i); } 2nd and 3rd round is technical interview. The position for which I was interview was core UNIX and c. Yes it is for system programming. The company has product name blade server. For their server they are creating their own command for their purpose. Example cd command. We can implement it in a c program by using the chdir() function. So the question asks related to PID, fork, pipe, shared memory, signal. Write a program in c which will act as cp command.

1 Answers   BladeLogic, Infosys,


Why is c faster?

0 Answers  


What is #pragma directive?how it is used in the program? what is its advantages and disadvantages?

2 Answers  


A C E G H +B D F A I ------------ E F G H D

1 Answers   Infosys,


What is a list in c?

0 Answers  


why array index always starts from zero??

4 Answers   TCS,


Categories