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

Define C in your own Language.

0 Answers   Motorola,


Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon

0 Answers  


Binary tree traversing

1 Answers   Qualcomm,


what is the output of the below code? main( ) { printf ( "\nOnly stupids use C?" ) ; display( ) ; } display( ) { printf ( "\nFools too use C!" ) ; main( ) ; }

3 Answers  


for (i <= 5 && i >= -1;++i; i > 0) { printf("%d ", i); }

1 Answers  






where do we use volatile keyword?

1 Answers  


How #define works?

0 Answers  


write a programme that inputs a number by user and gives its multiplication table.

2 Answers  


Find the largest number from the given 2 numbers without using any loops and the conditional operator.

2 Answers  


Why is c called a mid-level programming language?

0 Answers  


what is the difference between i++ and ++i?

5 Answers  


main() { int i; printf("%d",i^i); }

1 Answers  


Categories