#include #include #include "myheader.h" #define N 3 #define M 4 int main() { char *t[ N ][ M ] = { { "alma", "dio", "korte", "szilva" }, { "eper", "cseresznye", "banan", "narancs" }, { "mandarin", "szolo", "ribizli", "malna" } }; int i, j; int *p; printf( "%d %d\n\n", N, M ); for ( i = 0; i < N; ++i ) { for ( j = 0; j < M; ++j ) { if ( j > 0 ) putchar( ' ' ); printf( "*%s*", t[ i ][ j ] ); } putchar( '\n' ); } putchar( '\n' ); p = mohican( &t[ 0 ][ 0 ], N, M ); for ( i = 0; i < N; ++i ) { for ( j = 0; j < M; ++j ) { if ( j > 0 ) putchar( ' ' ); printf( "*%s*", t[ i ][ j ] ); } putchar( '\n' ); } putchar( '\n' ); printf( "%d %d\n", p[ 0 ], p[ 1 ] ); free( p ); return EXIT_SUCCESS; }