Identify the errors in the following code segment and give the reason of errors.
1 2 3 4 5 6 7 8 9 10 11
|
main(){
int x = 10
const int *ptr = &x ;
*ptr = 5 ;
}
main()
{
int x = 10;
const int *ptr = &x ;
cout <<ptr;
}
|
Identify the errors in the following code segment and give the reason of errors.
Topic archived. No new replies allowed.