---
title: "C语言_字符串指针学习笔记1"
author: "rafale35"
date: "2010-10-24T17:12:06Z"
tags: []
categories: ["编程语言"]
slug: "c-1"
draft: false
lastmod: "2010-10-24T17:12:06Z"
id: 792684
url: "https://rafale35.iteye.com/blog/792684"
---

```
strcpy(s, t)
	char s[], t[]; {
	int i;
	i = 0;
	while ((s[i] = t[i]) != '\o')
		i++;
}

strcpy(s, t)
	char *s, *t; {
	while ((*s = *t) != '\0') {
		s++;
		t++;
	}
}
strcpy(s, t)
	char *s, *t; {
	while ((*s++ = *t++) != '\0')
		;
}

strcpy(s, t)
	char *s, *t; {
	while ((*s++ = *t++))
		;
}

```