who can find the Errors in this statments ;
1-
Assume that: char str[ 5 ];
cin >> str; // user types "hello"
2-
int *zPtr; // zPtr will reference array z
int *aPtr = 0;
void *sPtr = 0;
int number;
int z[ 5 ] = { 1, 2, 3, 4, 5 };
++zPtr;
// use pointer to get first value of array
number = zPtr;
// assign array element 2 (the value 3) to number
number = *zPtr[ 2 ];
// print entire array z
for ( int i = 0; i <= 5; i++ )
cout << zPtr[ i ] << endl;
// assign the value pointed to by sPtr to number
number = *sPtr;
++z;
char s[ 10 ];
cout << strncpy( s, "hello", 5 ) << endl;
char s[ 12 ];
strcpy( s, "Welcome Home");
if ( strcmp( string1, string2 ) )
cout << "The strings are equal" << endl;