Why cann't whole array can be passed to function as value.
Answer Posted / 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 View All Answers
Is javascript based on c?
How do I swap bytes?
program for reversing a selected line word by word when multiple lines are given without using strrev
What is pointers in c?
How we can insert comments in a c program?
What are the two types of functions in c?
Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”.
Why flag is used in c?
How can I change their mode to binary?
How can I get back to the interactive keyboard if stdin is redirected?
Do you know null pointer?
What are the advantages of union?
main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none
What is the size of enum in bytes?
How a string is stored in c?