C语言教程
阿达King哥
专注JVM原理分析
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
GDB调试C++的new对象
源码 Chunk.hpp #include "stddef.h" class Chunk{ private: Chunk* _next; // Next Chunk in list const long _len; // Size of this Chunk public: Chunk(long length):_len(length){ _next = NULL; } char* bottom() const原创 2022-01-29 17:07:12 · 380 阅读 · 0 评论 -
C语言的单向链表代码
写着玩 #include <stdio.h> typedef struct Node { int num; struct Node *next; } Node; Node *head=NULL; int count = 0; void addNode() { int num; Node *p = (Node*)malloc(sizeof(Node)); prin...原创 2019-11-11 14:17:29 · 267 阅读 · 0 评论 -
2 循环结构
例1:求2-100之间的所有素数,并输出。判断某一个数是素数的方法为:设某一个数为a,a除了能表示为他自己和1的乘积以外,不能表示为任何其他两个整数的乘积。例如。15就不是素数,13是素数。#include #include main(){ int n, i, j, flag, x = 0; for(i = 2; i {原创 2010-01-06 21:36:00 · 1209 阅读 · 0 评论
分享