Question: Question 8 What is the error ( if any ) in this program? int main ( ) { int i = 3 5 , *

Question 8
What is the error (if any) in this program?
int main()
{
int i =35,*z ;
z = function ( &i ) ;
printf ("
%d", z );
return 0;
}
int* function ( int *m )
{
return (m +2);
}
No problem in the code
Might result in Segmentation fault as m is not pointing an array and m+2 is trying to access illegal memory
Syntax Error
Question 8 What is the error ( if any ) in this

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!