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


Please Help Members By Posting Answers For Below Questions

What are the different types of objects used in c?

566


Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.

1560


What is the advantage of an array over individual variables?

728


List some of the dynamic data structures in C?

779


void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }

1245






can we change the default calling convention in c if yes than how.........?

2024


What is self-referential structure in c programming?

649


what are the program that using a two dimensional array that list the odd numbers and even numbers separately in a given 10 inputs values

1253


What are static variables in c?

616


List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.

2296


What is huge pointer in c?

573


Explain goto?

705


What is a c token and types of c tokens?

581


What are the ways to a null pointer can use in c programming language?

585


what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?

1444