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

fun(int x) { if(x > 0) fun(x/2); printf("%d", x); } above function is called as: fun(10); what will it print? }

17 Answers   NDS,


c pgm count no of lines , blanks, tabs in a para(File concept)

2 Answers  


how to execute a program using if else condition and the output should enter number and the number is odd only...

0 Answers  


what is the little endian and big endian?

1 Answers  


4) Write a program that takes a 5 digit number and calculates 2 power that number and prints it.

5 Answers  






what does keyword ‘extern’ mean in a function declaration?

1 Answers   Emerson,


What does the message "automatic aggregate intialization is an ansi feature" mean?

0 Answers  


write a program to print data of 5 five students with structures?

0 Answers  


HOW TO ANSWER IF ASKED " WHAT KIND OF A PERSON ARE YOU?" I NEED AN ANSWER THAT IMPRESS THE INTERVIEWER

4 Answers  


What is openmp in c?

0 Answers  


which is faster execution: loops or recursion?

3 Answers  


dennis ritchie invented C language in AT&T bell laboratory what is the extension of AT&T?

4 Answers  


Categories