AviatorJeremy

2016年11月5日 #

[c语言]字符数组、字符串定义

摘要: C语言中字符串通常用字符指针和字符数组来定义: 这两种方式都会在结尾为字符串隐式补结束符'\0' 使得 若使用sizeof可以看到 所以在使用strncpy时切记strlen+1; 另,printf和strcpy等均以'\0'为结束标志,若以字符数组方式建立字符串时要记得加'\0'; 最好能在创建字 阅读全文

posted @ 2016-11-05 21:47 AviatorJeremy 阅读(491) 评论(0) 推荐(0) 编辑

2016年10月28日 #

[LeetCode]6.ZigZag Conversion

摘要: The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font 阅读全文

posted @ 2016-10-28 20:49 AviatorJeremy 阅读(140) 评论(0) 推荐(0) 编辑

导航