1,229 views
3 votes
3 votes
main( )
{
int num[ ] = { 24, 34, 12, 44, 56, 17 } ;
dislpay ( &num[0], 6 ) ;
}
 display ( int *j, int n )
{
int i ;
for ( i = 0 ; i <= n - 1 ; i++ )
{
printf ( "\nelement = %d", *j ) ;
j++ ;
}
}

1 Answer

0 votes
0 votes
one most important thing is compilation always start from 1st line of program....

now when compiler is getting on line where you call  display() function.....

there is no any function declaration at above ....that is... before you call any function we declare function()...so that compiler came to know that there is a function named as display().....and we may encounter its call...

BUT in our code there is no declaration...as a result...compiler is unable to understand what is display()...

and it will simply return compiler error

Related questions

1 votes
1 votes
1 answer
1
0 votes
0 votes
2 answers
2
0 votes
0 votes
1 answer
3
radha gogia asked Aug 10, 2015
393 views
CASE A: CASE A: &#8234;#&lrm;include&#8236;<stdio.h int divide( int a, b) { return 7; } int main() { int a=divide(8,3); printf("%d",a); return 0; }CASE B :CASE B : #inclu...
0 votes
0 votes
1 answer
4