c语言模拟perl python中的数组负数索引
int main()
{
int a[] = {1,2,3,4,5};
int i;
int * p = a;
for (p = a + 4, i = 0; i < 5; i++) {
printf("%d ",p[-i]);
}
return 0;
}
相关文档:
Boss说,要看OpenGL,看了快一个月,总算出了个像样的东西,用C写了个3D迷宫,
虽然只有350行
代码,不过边学边写,足足写了一周时间,还是小有成就感的,活活活!
&n ......
Linux C + + Training
Syllabus
________________________________________
1, Linux Operating System
System Environment: Ubuntu GNU / Linux, RedHat Linux AS5,
FreeBSD
Course Requirements: proficient use of commonly used Linux
/ UNIX commands.
Time: 1 week.
______________________________ ......
c:forEach vaStatus 属性
用c:forEach 中vaStatus的属性可以获得迭代的自身状态,如:
<c:forEach var="" items="" varStatus="status">
<c:out value="${status.index}"/> 此次迭代的索引
<c:out value="${status.count}"/> 已经迭代的数量
<c:out value="${status.first}"/> 是否是第一 ......
来自:http://zhangjunhd.blog.51cto.com/113473/100299
1.读写字符函数putc()与getc()
这两个函数类似于putchar()与getchar()函数。假设fp是一个FILE指针,ch是一个字符变量,
ch = getc(fp);// ch = getchar();
putc(ch,fp);// putchar(ch);
将文件内容(按字符)输出到标准输出的C实现:
#include <stdio.h ......
工具栏->高级->配置->编辑器显示->语法加亮->打开
在打开的文件中结尾加上下面文字,并保存。
/L10"Python" Line Comment = # Block Comment One = """ Block Comment Off = """ Escape Char = \ File Extensions = PY PYW
/Indent Strings = ":"
/Function String 1 = "%[ ,^t]++def[ ]+^([a-zA-Z0-9_] ......