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

.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }

0 Answers   Wilco,


what is the difference between entry control and exit control statement?

12 Answers   Darbari Lal DAV Model School,


What is c language & why it is used?

0 Answers  


write a program to read a number and print in words that is in sentence for example 21,219 then output is "twenty one thousand and two hundred nineteen" by using only control flow statements (only loops and switch case )?

1 Answers   TCS,


Write a function that accepts a sentence as a parameter, and returns the same with each of its words reversed. The returned sentence should have 1 blank space between each pair of words. Demonstrate the usage of this function from a main program. Example: Parameter: “jack and jill went up a hill” Return Value: “kcaj dna llij tnew pu a llih”

5 Answers   Mind Tree,






write a c program to find reminder and quotient if one number is divided by other.to code this program don't use more than 2 variables

2 Answers   TCS,


what is the hardware model of CFG( context free grammar)

0 Answers   Microsoft,


How to write a program to receive an integer & find its octal equivalent by using for loop?

1 Answers   Google,


void main() { char c; while(c=getchar()!='\n') printf("%d",c); } o/p=11 why?

8 Answers   Wipro,


Which function in C can be used to append a string to another string?

0 Answers  


what is the output on the screen? int n; n=printf("my name is %d",printf("kiran %d",printf("kumar"))); printf("\n %d \n",n);

4 Answers   TCS,


User define function contain thier own address or not.

2 Answers  


Categories