Why cann't whole array can be passed to function as value.



Why cann't whole array can be passed to function as value...

Answer / vignesh1988i

ya it's possible ..... we can pass whole array as an value....

let's take the code :

void function(char [] );
void main()
{
char ch[30];
function(ch);
getch();
}

void function(char ch[])
{
printf("%s",ch);
}

thank u

hope this will work.....

Is This Answer Correct ?    0 Yes 4 No

Post New Answer

More C Interview Questions

Evaluate the following: int fn(int v) { if(v==1 || v==0) return 1; if(v%2==0) return fn(v/2)+2; else return fn(v-1)+3; } for fn(7); 1) 10 2) 11 3) 1

6 Answers  


Write a program to print distinct words in an input along with their count in input in decreasing order of their count..

1 Answers  


WAP TO ACCEPT STRING AND COUNT A COMES N TIMES B COMES N TIMES C COMES N TIMES D COMES N TIMES AND SO ON......... AT LAST UNTIL Z COMES N TIMES...............

3 Answers  


how many times does the loop iterated ? for (i=0;i=10;i+=2) printf("Hi\n");

9 Answers   TCS,


What is table lookup in c?

0 Answers  


define string ?

0 Answers  


All technical questions

0 Answers   TCS,


What is zero based addressing?

0 Answers  


What is the OOPs concept?

3 Answers  


Why can't we initialise member variable of a strucutre

1 Answers  


Is Exception handling possible in c language?

0 Answers   Wipro,


How can I increase the allowable number of simultaneously open files?

1 Answers   CSC,


Categories