#include <stdio.h>
#include <string.h>

void hoge(char *str)
{
	char *p;

	p = strchr(str, '\n');
	if (p == NULL) return;
	memmove(str, p, strlen(p) + 1);
}

int main()
{
	char str[] = "abc\ndef";

	hoge(str);
	printf("%s\n", str);
	return 0;
}
