如果s
是一个字符串(说"thisisthe"
),如何将第一个字节存储到另一个字符串s2
?将字符串的第一个字节存储到另一个字符串中:LZW压缩算法
#include <stdio.h>
int main() {
char s[]="thisisthe";
char s1=s[0]; // Store the first byte of s as a char.
char s2[]=s[1]; // store the second byte of s as a string.
printf("%s\n",s2);
return 0;
}
你能避免肘粗体字?谢谢。 – 2014-09-21 16:12:02