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

In cryptography, you could often break the algorithm if you know what was the original (plain) text that was encoded into the current ciphertext. This is called the plain text attack. In this simple problem, we illustrate the plain text attack on a simple substitution cipher encryption, where you know each letter has been substituted with a different letter from the alphabet but you don’t know what that letter is. You are given the cipherText as the input string to the function getwordSets(). You know that a plain text "AMMUNITION" occurs somewhere in this cipher text. Now, you have to find out which sets of characters corresponds to the encrypted form of the "AMMUNITION". You can assume that the encryption follows simple substitution only. [Hint: You could use the pattern in the "AMMUNITION" like MM occurring twice together to identify this]

0 Answers   Infosys,


Describe how arrays can be passed to a user defined function

0 Answers  


What is an volatile variable?

15 Answers   HP,


What is the difference between a string and an array?

0 Answers  


write a recursive program in'c'to find whether a given five digit number is a palindrome or not

2 Answers  






Explain low-order bytes.

0 Answers  


can v write main() { main(); } Is it true?

6 Answers  


What is c value paradox explain?

0 Answers  


What are loops in c?

0 Answers  


What is the difference between union and structure in c?

0 Answers  


Write a program which calculate sum of several number and input it into an array. Then, the sum of all the number in the array is calculated.

2 Answers  


write a programming in c to find the sum of all elements in an array through function.

0 Answers  


Categories