17 lines
379 B
C++
17 lines
379 B
C++
#include <stdio.h>
|
|
|
|
|
|
void main(void)
|
|
{
|
|
char Nombre2[] = "Esto es una prueba";
|
|
//"Prueba";
|
|
char Nombre;
|
|
|
|
strcpy( Nombre , Nombre2 );
|
|
char *p; p = Nombre2;
|
|
while ( *(p++) != '\0' ); while ( *(p--) != ' ' || p != Nombre2 ); *p = '\0';
|
|
strcpy( Apellido1, p+1);
|
|
|
|
printf( "Nombre: %s \nApellido: %s\n\n", Nombre, Apellido1 );
|
|
}
|