├── C语言笔记.md
├── README.md
├── code
├── 1
│ ├── 1.4
│ ├── 1.4.c
│ └── gccby
│ │ ├── introduce
│ │ ├── introduce.c
│ │ ├── introduce.i
│ │ ├── introduce.o
│ │ ├── introduce.s
│ │ └── introduce1
├── 2
│ ├── 2.2.1
│ ├── 2.2.1.c
│ ├── 2.2.2
│ ├── 2.2.2.c
│ ├── 2.2.3
│ ├── 2.2.3.c
│ ├── 2.2.4-1
│ ├── 2.2.4-1.c
│ ├── 2.3
│ ├── 2.3.c
│ ├── 2.4.1
│ ├── 2.4.1.c
│ ├── 2.4.2
│ ├── 2.4.2.c
│ ├── 2.4.4
│ ├── 2.4.4.c
│ ├── 2.5
│ ├── 2.5.c
│ ├── 2.6.4
│ ├── 2.6.4.c
│ ├── 2.7.5
│ ├── 2.7.5.c
│ ├── 2.9.2
│ ├── 2.9.2.c
│ ├── 2.9.3
│ └── 2.9.3.c
├── 3
│ ├── 3.7.1
│ ├── 3.7.1.c
│ ├── 3.7.2
│ └── 3.7.2.c
├── 4
│ ├── 4.2.5
│ ├── 4.2.5.c
│ ├── 4.3.1
│ ├── 4.3.1.c
│ ├── 4.4.2
│ ├── 4.4.2.c
│ ├── 4.4.3
│ └── 4.4.3.c
├── 5
│ ├── 5.2.1
│ ├── 5.2.1.c
│ ├── 5.2.3
│ ├── 5.2.3.c
│ ├── 5.2.4-1
│ ├── 5.2.4-1.c
│ ├── 5.2.4-2
│ ├── 5.2.4-2.c
│ ├── 5.2.4-3
│ ├── 5.2.4-3.c
│ ├── 5.3.3
│ ├── 5.3.3.c
│ ├── 5.3.4
│ ├── 5.3.4.c
│ ├── 5.4
│ ├── 5.4.c
│ ├── 5.5.1
│ ├── 5.5.1.c
│ ├── 5.5.2.c
│ ├── 5.5.3-5
│ └── 5.5.3-5.c
├── 6
│ ├── 6.1.2
│ └── 6.1.2.c
├── 7
│ ├── 7.2.1
│ ├── 7.2.1.c
│ ├── 7.2.3
│ ├── 7.2.3.c
│ ├── 7.3.2
│ ├── 7.3.2.c
│ ├── 7.3.3-2
│ ├── 7.3.3-2.c
│ ├── 7.5.1
│ ├── 7.5.1.c
│ ├── 7.5.2
│ ├── 7.5.2.c
│ ├── 7.5.3
│ ├── 7.5.3.c
│ ├── 7.5.5-1-a
│ ├── 7.5.5-1-a.c
│ ├── 7.6.1
│ ├── 7.6.1.c
│ ├── 7.6.5-2
│ ├── 7.6.5-2.c
│ ├── 7.6.5-3
│ ├── 7.6.5-3.c
│ ├── 7.6.5.1-2
│ ├── 7.6.5.1-2.c
│ ├── 7.6.6-9
│ ├── 7.6.6-9.c
│ ├── 7.7.3
│ └── 7.7.3.c
├── 8
│ ├── 8.1.2
│ ├── 8.1.2.c
│ ├── 8.2.2
│ ├── 8.2.2.c
│ ├── 8.2.4-1
│ └── 8.2.4-1.c
└── 9
│ ├── 10.5
│ ├── 10.5.c
│ ├── 9.3
│ └── 9.3.c
├── docs
├── C基础讲义.doc
└── C语言标准库函数大全.chm
└── img
├── 2-1Q11512525J14.gif
├── clip_image002-1600476727438.jpg
├── clip_image002-1600476849331.jpg
├── clip_image002-1600476855287.jpg
├── clip_image002-1600476859772.jpg
├── clip_image002-1600480373517.png
├── clip_image002-1600484267948.jpg
├── clip_image002-1600484293600.jpg
├── clip_image002-1600484648234.jpg
├── clip_image002-1600495561286.jpg
├── clip_image002-1600500777852.png
├── clip_image002-1600500801245.jpg
├── clip_image002-1600500855480.jpg
├── clip_image002-1600500866476.jpg
├── clip_image002-1600501357582.jpg
├── clip_image002-1600501365915.jpg
├── clip_image002-1600502184471.jpg
├── clip_image002-1600502207939.jpg
├── clip_image002-1600503616364.jpg
├── clip_image002-1600565386733.jpg
├── clip_image002-1600565899951.png
├── clip_image002-1600565955370.png
├── clip_image002-1600565985028.png
├── clip_image002-1600566360348.png
├── clip_image002-1600566398556.png
├── clip_image002-1600570691948.png
├── clip_image002-1600585634394.png
├── clip_image002-1600753669406.jpg
├── clip_image002-1600778555216.jpg
├── clip_image002-1600782355725.png
├── clip_image002-1600782473718.png
├── clip_image002-1600937546831.png
├── clip_image002-1601020859989.jpg
├── clip_image002-1601021875042.jpg
├── clip_image002-1601038402799.jpg
├── clip_image002-1601038507385.jpg
├── clip_image002-1601113908804.jpg
├── clip_image002-1601123785585.png
├── clip_image002-1601131241385.jpg
├── clip_image002-1601131628499.jpg
├── clip_image002-1601186383431.jpg
├── clip_image002.jpg
├── clip_image002.png
├── image-20200919090134713.png
├── image-20200919092034856.png
├── image-20200919094712699.png
├── image-20200919101105887.png
├── image-20200919101944251.png
├── image-20200919102259922.png
├── image-20200919102850515.png
├── image-20200919102938934.png
├── image-20200919133924510.png
├── image-20200920092724191.png
├── image-20200920211035690.png
├── image-20200925161021903.png
└── readme.txt
/README.md:
--------------------------------------------------------------------------------
1 | # C-Learning
2 | C语言基础学习笔记!
3 |
4 | ## 已完成章节
5 | - 1.C语言概述
6 | - 2.数据类型
7 | - 3.运算符与表达式
8 | - 4.程序流程结构
9 | - 5.数组和字符串
10 | - 6.函数
11 | - 7.指针
12 | - 8.内存管理
13 | - 9.复合类型(自定义类型)
14 | - 10.文件操作
15 |
16 | **本笔记代码(code目录下)在Linux平台下测试运行的**
17 |
18 | > 注:本学习笔记以及案例来源于黑马程序员C语言入门教程,源文件已放置`docs/`目录下
19 |
--------------------------------------------------------------------------------
/code/1/1.4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/1/1.4
--------------------------------------------------------------------------------
/code/1/1.4.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | int main(){
5 | // system("calc"); // windows平台
6 | system("ls"); // //Linux平台, 需要头文件#include
7 |
8 | return 0;
9 | }
10 |
--------------------------------------------------------------------------------
/code/1/gccby/introduce:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/1/gccby/introduce
--------------------------------------------------------------------------------
/code/1/gccby/introduce.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main(){
4 | printf("Hello Tao!");
5 |
6 | return 0;
7 | }
8 |
--------------------------------------------------------------------------------
/code/1/gccby/introduce.i:
--------------------------------------------------------------------------------
1 | # 1 "introduce.c"
2 | # 1 ""
3 | # 1 ""
4 | # 31 ""
5 | # 1 "/usr/include/stdc-predef.h" 1 3 4
6 | # 32 "" 2
7 | # 1 "introduce.c"
8 | # 1 "/usr/include/stdio.h" 1 3 4
9 | # 27 "/usr/include/stdio.h" 3 4
10 | # 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4
11 | # 33 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4
12 | # 1 "/usr/include/features.h" 1 3 4
13 | # 446 "/usr/include/features.h" 3 4
14 | # 1 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 1 3 4
15 | # 452 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4
16 | # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
17 | # 453 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 2 3 4
18 | # 1 "/usr/include/x86_64-linux-gnu/bits/long-double.h" 1 3 4
19 | # 454 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 2 3 4
20 | # 447 "/usr/include/features.h" 2 3 4
21 | # 470 "/usr/include/features.h" 3 4
22 | # 1 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 1 3 4
23 | # 10 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 3 4
24 | # 1 "/usr/include/x86_64-linux-gnu/gnu/stubs-64.h" 1 3 4
25 | # 11 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 2 3 4
26 | # 471 "/usr/include/features.h" 2 3 4
27 | # 34 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 2 3 4
28 | # 28 "/usr/include/stdio.h" 2 3 4
29 |
30 |
31 |
32 |
33 |
34 | # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/include/stddef.h" 1 3 4
35 | # 216 "/usr/lib/gcc/x86_64-linux-gnu/8/include/stddef.h" 3 4
36 |
37 | # 216 "/usr/lib/gcc/x86_64-linux-gnu/8/include/stddef.h" 3 4
38 | typedef long unsigned int size_t;
39 | # 34 "/usr/include/stdio.h" 2 3 4
40 |
41 |
42 | # 1 "/usr/lib/gcc/x86_64-linux-gnu/8/include/stdarg.h" 1 3 4
43 | # 40 "/usr/lib/gcc/x86_64-linux-gnu/8/include/stdarg.h" 3 4
44 | typedef __builtin_va_list __gnuc_va_list;
45 | # 37 "/usr/include/stdio.h" 2 3 4
46 |
47 | # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4
48 | # 27 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4
49 | # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
50 | # 28 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4
51 | # 1 "/usr/include/x86_64-linux-gnu/bits/timesize.h" 1 3 4
52 | # 29 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4
53 |
54 |
55 | typedef unsigned char __u_char;
56 | typedef unsigned short int __u_short;
57 | typedef unsigned int __u_int;
58 | typedef unsigned long int __u_long;
59 |
60 |
61 | typedef signed char __int8_t;
62 | typedef unsigned char __uint8_t;
63 | typedef signed short int __int16_t;
64 | typedef unsigned short int __uint16_t;
65 | typedef signed int __int32_t;
66 | typedef unsigned int __uint32_t;
67 |
68 | typedef signed long int __int64_t;
69 | typedef unsigned long int __uint64_t;
70 |
71 |
72 |
73 |
74 |
75 |
76 | typedef __int8_t __int_least8_t;
77 | typedef __uint8_t __uint_least8_t;
78 | typedef __int16_t __int_least16_t;
79 | typedef __uint16_t __uint_least16_t;
80 | typedef __int32_t __int_least32_t;
81 | typedef __uint32_t __uint_least32_t;
82 | typedef __int64_t __int_least64_t;
83 | typedef __uint64_t __uint_least64_t;
84 |
85 |
86 |
87 | typedef long int __quad_t;
88 | typedef unsigned long int __u_quad_t;
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 | typedef long int __intmax_t;
97 | typedef unsigned long int __uintmax_t;
98 | # 141 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4
99 | # 1 "/usr/include/x86_64-linux-gnu/bits/typesizes.h" 1 3 4
100 | # 142 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4
101 | # 1 "/usr/include/x86_64-linux-gnu/bits/time64.h" 1 3 4
102 | # 143 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4
103 |
104 |
105 | typedef unsigned long int __dev_t;
106 | typedef unsigned int __uid_t;
107 | typedef unsigned int __gid_t;
108 | typedef unsigned long int __ino_t;
109 | typedef unsigned long int __ino64_t;
110 | typedef unsigned int __mode_t;
111 | typedef unsigned long int __nlink_t;
112 | typedef long int __off_t;
113 | typedef long int __off64_t;
114 | typedef int __pid_t;
115 | typedef struct { int __val[2]; } __fsid_t;
116 | typedef long int __clock_t;
117 | typedef unsigned long int __rlim_t;
118 | typedef unsigned long int __rlim64_t;
119 | typedef unsigned int __id_t;
120 | typedef long int __time_t;
121 | typedef unsigned int __useconds_t;
122 | typedef long int __suseconds_t;
123 |
124 | typedef int __daddr_t;
125 | typedef int __key_t;
126 |
127 |
128 | typedef int __clockid_t;
129 |
130 |
131 | typedef void * __timer_t;
132 |
133 |
134 | typedef long int __blksize_t;
135 |
136 |
137 |
138 |
139 | typedef long int __blkcnt_t;
140 | typedef long int __blkcnt64_t;
141 |
142 |
143 | typedef unsigned long int __fsblkcnt_t;
144 | typedef unsigned long int __fsblkcnt64_t;
145 |
146 |
147 | typedef unsigned long int __fsfilcnt_t;
148 | typedef unsigned long int __fsfilcnt64_t;
149 |
150 |
151 | typedef long int __fsword_t;
152 |
153 | typedef long int __ssize_t;
154 |
155 |
156 | typedef long int __syscall_slong_t;
157 |
158 | typedef unsigned long int __syscall_ulong_t;
159 |
160 |
161 |
162 | typedef __off64_t __loff_t;
163 | typedef char *__caddr_t;
164 |
165 |
166 | typedef long int __intptr_t;
167 |
168 |
169 | typedef unsigned int __socklen_t;
170 |
171 |
172 |
173 |
174 | typedef int __sig_atomic_t;
175 | # 39 "/usr/include/stdio.h" 2 3 4
176 | # 1 "/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h" 1 3 4
177 |
178 |
179 |
180 |
181 | # 1 "/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h" 1 3 4
182 | # 13 "/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h" 3 4
183 | typedef struct
184 | {
185 | int __count;
186 | union
187 | {
188 | unsigned int __wch;
189 | char __wchb[4];
190 | } __value;
191 | } __mbstate_t;
192 | # 6 "/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h" 2 3 4
193 |
194 |
195 |
196 |
197 | typedef struct _G_fpos_t
198 | {
199 | __off_t __pos;
200 | __mbstate_t __state;
201 | } __fpos_t;
202 | # 40 "/usr/include/stdio.h" 2 3 4
203 | # 1 "/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h" 1 3 4
204 | # 10 "/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h" 3 4
205 | typedef struct _G_fpos64_t
206 | {
207 | __off64_t __pos;
208 | __mbstate_t __state;
209 | } __fpos64_t;
210 | # 41 "/usr/include/stdio.h" 2 3 4
211 | # 1 "/usr/include/x86_64-linux-gnu/bits/types/__FILE.h" 1 3 4
212 |
213 |
214 |
215 | struct _IO_FILE;
216 | typedef struct _IO_FILE __FILE;
217 | # 42 "/usr/include/stdio.h" 2 3 4
218 | # 1 "/usr/include/x86_64-linux-gnu/bits/types/FILE.h" 1 3 4
219 |
220 |
221 |
222 | struct _IO_FILE;
223 |
224 |
225 | typedef struct _IO_FILE FILE;
226 | # 43 "/usr/include/stdio.h" 2 3 4
227 | # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h" 1 3 4
228 | # 35 "/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h" 3 4
229 | struct _IO_FILE;
230 | struct _IO_marker;
231 | struct _IO_codecvt;
232 | struct _IO_wide_data;
233 |
234 |
235 |
236 |
237 | typedef void _IO_lock_t;
238 |
239 |
240 |
241 |
242 |
243 | struct _IO_FILE
244 | {
245 | int _flags;
246 |
247 |
248 | char *_IO_read_ptr;
249 | char *_IO_read_end;
250 | char *_IO_read_base;
251 | char *_IO_write_base;
252 | char *_IO_write_ptr;
253 | char *_IO_write_end;
254 | char *_IO_buf_base;
255 | char *_IO_buf_end;
256 |
257 |
258 | char *_IO_save_base;
259 | char *_IO_backup_base;
260 | char *_IO_save_end;
261 |
262 | struct _IO_marker *_markers;
263 |
264 | struct _IO_FILE *_chain;
265 |
266 | int _fileno;
267 | int _flags2;
268 | __off_t _old_offset;
269 |
270 |
271 | unsigned short _cur_column;
272 | signed char _vtable_offset;
273 | char _shortbuf[1];
274 |
275 | _IO_lock_t *_lock;
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 | __off64_t _offset;
284 |
285 | struct _IO_codecvt *_codecvt;
286 | struct _IO_wide_data *_wide_data;
287 | struct _IO_FILE *_freeres_list;
288 | void *_freeres_buf;
289 | size_t __pad5;
290 | int _mode;
291 |
292 | char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
293 | };
294 | # 44 "/usr/include/stdio.h" 2 3 4
295 | # 52 "/usr/include/stdio.h" 3 4
296 | typedef __gnuc_va_list va_list;
297 | # 63 "/usr/include/stdio.h" 3 4
298 | typedef __off_t off_t;
299 | # 77 "/usr/include/stdio.h" 3 4
300 | typedef __ssize_t ssize_t;
301 |
302 |
303 |
304 |
305 |
306 |
307 | typedef __fpos_t fpos_t;
308 | # 133 "/usr/include/stdio.h" 3 4
309 | # 1 "/usr/include/x86_64-linux-gnu/bits/stdio_lim.h" 1 3 4
310 | # 134 "/usr/include/stdio.h" 2 3 4
311 |
312 |
313 |
314 | extern FILE *stdin;
315 | extern FILE *stdout;
316 | extern FILE *stderr;
317 |
318 |
319 |
320 |
321 |
322 |
323 | extern int remove (const char *__filename) __attribute__ ((__nothrow__ , __leaf__));
324 |
325 | extern int rename (const char *__old, const char *__new) __attribute__ ((__nothrow__ , __leaf__));
326 |
327 |
328 |
329 | extern int renameat (int __oldfd, const char *__old, int __newfd,
330 | const char *__new) __attribute__ ((__nothrow__ , __leaf__));
331 | # 173 "/usr/include/stdio.h" 3 4
332 | extern FILE *tmpfile (void) ;
333 | # 187 "/usr/include/stdio.h" 3 4
334 | extern char *tmpnam (char *__s) __attribute__ ((__nothrow__ , __leaf__)) ;
335 |
336 |
337 |
338 |
339 | extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__ , __leaf__)) ;
340 | # 204 "/usr/include/stdio.h" 3 4
341 | extern char *tempnam (const char *__dir, const char *__pfx)
342 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) ;
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 | extern int fclose (FILE *__stream);
351 |
352 |
353 |
354 |
355 | extern int fflush (FILE *__stream);
356 | # 227 "/usr/include/stdio.h" 3 4
357 | extern int fflush_unlocked (FILE *__stream);
358 | # 246 "/usr/include/stdio.h" 3 4
359 | extern FILE *fopen (const char *__restrict __filename,
360 | const char *__restrict __modes) ;
361 |
362 |
363 |
364 |
365 | extern FILE *freopen (const char *__restrict __filename,
366 | const char *__restrict __modes,
367 | FILE *__restrict __stream) ;
368 | # 279 "/usr/include/stdio.h" 3 4
369 | extern FILE *fdopen (int __fd, const char *__modes) __attribute__ ((__nothrow__ , __leaf__)) ;
370 | # 292 "/usr/include/stdio.h" 3 4
371 | extern FILE *fmemopen (void *__s, size_t __len, const char *__modes)
372 | __attribute__ ((__nothrow__ , __leaf__)) ;
373 |
374 |
375 |
376 |
377 | extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__ , __leaf__)) ;
378 |
379 |
380 |
381 |
382 |
383 | extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
384 |
385 |
386 |
387 | extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
388 | int __modes, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
389 |
390 |
391 |
392 |
393 | extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
394 | size_t __size) __attribute__ ((__nothrow__ , __leaf__));
395 |
396 |
397 | extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
398 |
399 |
400 |
401 |
402 |
403 |
404 |
405 | extern int fprintf (FILE *__restrict __stream,
406 | const char *__restrict __format, ...);
407 |
408 |
409 |
410 |
411 | extern int printf (const char *__restrict __format, ...);
412 |
413 | extern int sprintf (char *__restrict __s,
414 | const char *__restrict __format, ...) __attribute__ ((__nothrow__));
415 |
416 |
417 |
418 |
419 |
420 | extern int vfprintf (FILE *__restrict __s, const char *__restrict __format,
421 | __gnuc_va_list __arg);
422 |
423 |
424 |
425 |
426 | extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg);
427 |
428 | extern int vsprintf (char *__restrict __s, const char *__restrict __format,
429 | __gnuc_va_list __arg) __attribute__ ((__nothrow__));
430 |
431 |
432 |
433 | extern int snprintf (char *__restrict __s, size_t __maxlen,
434 | const char *__restrict __format, ...)
435 | __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));
436 |
437 | extern int vsnprintf (char *__restrict __s, size_t __maxlen,
438 | const char *__restrict __format, __gnuc_va_list __arg)
439 | __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));
440 | # 379 "/usr/include/stdio.h" 3 4
441 | extern int vdprintf (int __fd, const char *__restrict __fmt,
442 | __gnuc_va_list __arg)
443 | __attribute__ ((__format__ (__printf__, 2, 0)));
444 | extern int dprintf (int __fd, const char *__restrict __fmt, ...)
445 | __attribute__ ((__format__ (__printf__, 2, 3)));
446 |
447 |
448 |
449 |
450 |
451 |
452 |
453 | extern int fscanf (FILE *__restrict __stream,
454 | const char *__restrict __format, ...) ;
455 |
456 |
457 |
458 |
459 | extern int scanf (const char *__restrict __format, ...) ;
460 |
461 | extern int sscanf (const char *__restrict __s,
462 | const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__));
463 |
464 |
465 |
466 |
467 |
468 |
469 | extern int fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __asm__ ("" "__isoc99_fscanf")
470 |
471 | ;
472 | extern int scanf (const char *__restrict __format, ...) __asm__ ("" "__isoc99_scanf")
473 | ;
474 | extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) __asm__ ("" "__isoc99_sscanf") __attribute__ ((__nothrow__ , __leaf__))
475 |
476 | ;
477 | # 432 "/usr/include/stdio.h" 3 4
478 | extern int vfscanf (FILE *__restrict __s, const char *__restrict __format,
479 | __gnuc_va_list __arg)
480 | __attribute__ ((__format__ (__scanf__, 2, 0))) ;
481 |
482 |
483 |
484 |
485 |
486 | extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg)
487 | __attribute__ ((__format__ (__scanf__, 1, 0))) ;
488 |
489 |
490 | extern int vsscanf (const char *__restrict __s,
491 | const char *__restrict __format, __gnuc_va_list __arg)
492 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__scanf__, 2, 0)));
493 |
494 |
495 |
496 |
497 | extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vfscanf")
498 |
499 |
500 |
501 | __attribute__ ((__format__ (__scanf__, 2, 0))) ;
502 | extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vscanf")
503 |
504 | __attribute__ ((__format__ (__scanf__, 1, 0))) ;
505 | extern int vsscanf (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vsscanf") __attribute__ ((__nothrow__ , __leaf__))
506 |
507 |
508 |
509 | __attribute__ ((__format__ (__scanf__, 2, 0)));
510 | # 485 "/usr/include/stdio.h" 3 4
511 | extern int fgetc (FILE *__stream);
512 | extern int getc (FILE *__stream);
513 |
514 |
515 |
516 |
517 |
518 | extern int getchar (void);
519 |
520 |
521 |
522 |
523 |
524 |
525 | extern int getc_unlocked (FILE *__stream);
526 | extern int getchar_unlocked (void);
527 | # 510 "/usr/include/stdio.h" 3 4
528 | extern int fgetc_unlocked (FILE *__stream);
529 | # 521 "/usr/include/stdio.h" 3 4
530 | extern int fputc (int __c, FILE *__stream);
531 | extern int putc (int __c, FILE *__stream);
532 |
533 |
534 |
535 |
536 |
537 | extern int putchar (int __c);
538 | # 537 "/usr/include/stdio.h" 3 4
539 | extern int fputc_unlocked (int __c, FILE *__stream);
540 |
541 |
542 |
543 |
544 |
545 |
546 |
547 | extern int putc_unlocked (int __c, FILE *__stream);
548 | extern int putchar_unlocked (int __c);
549 |
550 |
551 |
552 |
553 |
554 |
555 | extern int getw (FILE *__stream);
556 |
557 |
558 | extern int putw (int __w, FILE *__stream);
559 |
560 |
561 |
562 |
563 |
564 |
565 |
566 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
567 | ;
568 | # 603 "/usr/include/stdio.h" 3 4
569 | extern __ssize_t __getdelim (char **__restrict __lineptr,
570 | size_t *__restrict __n, int __delimiter,
571 | FILE *__restrict __stream) ;
572 | extern __ssize_t getdelim (char **__restrict __lineptr,
573 | size_t *__restrict __n, int __delimiter,
574 | FILE *__restrict __stream) ;
575 |
576 |
577 |
578 |
579 |
580 |
581 |
582 | extern __ssize_t getline (char **__restrict __lineptr,
583 | size_t *__restrict __n,
584 | FILE *__restrict __stream) ;
585 |
586 |
587 |
588 |
589 |
590 |
591 |
592 | extern int fputs (const char *__restrict __s, FILE *__restrict __stream);
593 |
594 |
595 |
596 |
597 |
598 | extern int puts (const char *__s);
599 |
600 |
601 |
602 |
603 |
604 |
605 | extern int ungetc (int __c, FILE *__stream);
606 |
607 |
608 |
609 |
610 |
611 |
612 | extern size_t fread (void *__restrict __ptr, size_t __size,
613 | size_t __n, FILE *__restrict __stream) ;
614 |
615 |
616 |
617 |
618 | extern size_t fwrite (const void *__restrict __ptr, size_t __size,
619 | size_t __n, FILE *__restrict __s);
620 | # 673 "/usr/include/stdio.h" 3 4
621 | extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
622 | size_t __n, FILE *__restrict __stream) ;
623 | extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size,
624 | size_t __n, FILE *__restrict __stream);
625 |
626 |
627 |
628 |
629 |
630 |
631 |
632 | extern int fseek (FILE *__stream, long int __off, int __whence);
633 |
634 |
635 |
636 |
637 | extern long int ftell (FILE *__stream) ;
638 |
639 |
640 |
641 |
642 | extern void rewind (FILE *__stream);
643 | # 707 "/usr/include/stdio.h" 3 4
644 | extern int fseeko (FILE *__stream, __off_t __off, int __whence);
645 |
646 |
647 |
648 |
649 | extern __off_t ftello (FILE *__stream) ;
650 | # 731 "/usr/include/stdio.h" 3 4
651 | extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
652 |
653 |
654 |
655 |
656 | extern int fsetpos (FILE *__stream, const fpos_t *__pos);
657 | # 757 "/usr/include/stdio.h" 3 4
658 | extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
659 |
660 | extern int feof (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) ;
661 |
662 | extern int ferror (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) ;
663 |
664 |
665 |
666 | extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
667 | extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) ;
668 | extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) ;
669 |
670 |
671 |
672 |
673 |
674 |
675 |
676 | extern void perror (const char *__s);
677 |
678 |
679 |
680 |
681 |
682 | # 1 "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h" 1 3 4
683 | # 26 "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h" 3 4
684 | extern int sys_nerr;
685 | extern const char *const sys_errlist[];
686 | # 782 "/usr/include/stdio.h" 2 3 4
687 |
688 |
689 |
690 |
691 | extern int fileno (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) ;
692 |
693 |
694 |
695 |
696 | extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) ;
697 | # 800 "/usr/include/stdio.h" 3 4
698 | extern FILE *popen (const char *__command, const char *__modes) ;
699 |
700 |
701 |
702 |
703 |
704 | extern int pclose (FILE *__stream);
705 |
706 |
707 |
708 |
709 |
710 | extern char *ctermid (char *__s) __attribute__ ((__nothrow__ , __leaf__));
711 | # 840 "/usr/include/stdio.h" 3 4
712 | extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
713 |
714 |
715 |
716 | extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) ;
717 |
718 |
719 | extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
720 | # 858 "/usr/include/stdio.h" 3 4
721 | extern int __uflow (FILE *);
722 | extern int __overflow (FILE *, int);
723 | # 873 "/usr/include/stdio.h" 3 4
724 |
725 | # 2 "introduce.c" 2
726 |
727 |
728 | # 3 "introduce.c"
729 | int main(){
730 | printf("Hello Tao!");
731 |
732 | return 0;
733 | }
734 |
--------------------------------------------------------------------------------
/code/1/gccby/introduce.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/1/gccby/introduce.o
--------------------------------------------------------------------------------
/code/1/gccby/introduce.s:
--------------------------------------------------------------------------------
1 | .file "introduce.c"
2 | .text
3 | .section .rodata
4 | .LC0:
5 | .string "Hello Tao!"
6 | .text
7 | .globl main
8 | .type main, @function
9 | main:
10 | .LFB0:
11 | .cfi_startproc
12 | pushq %rbp
13 | .cfi_def_cfa_offset 16
14 | .cfi_offset 6, -16
15 | movq %rsp, %rbp
16 | .cfi_def_cfa_register 6
17 | leaq .LC0(%rip), %rdi
18 | movl $0, %eax
19 | call printf@PLT
20 | movl $0, %eax
21 | popq %rbp
22 | .cfi_def_cfa 7, 8
23 | ret
24 | .cfi_endproc
25 | .LFE0:
26 | .size main, .-main
27 | .ident "GCC: (Ubuntu 8.4.0-1ubuntu1~18.04) 8.4.0"
28 | .section .note.GNU-stack,"",@progbits
29 |
--------------------------------------------------------------------------------
/code/1/gccby/introduce1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/1/gccby/introduce1
--------------------------------------------------------------------------------
/code/2/2.2.1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/2/2.2.1
--------------------------------------------------------------------------------
/code/2/2.2.1.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main()
4 | {
5 | int a = 123; //定义变量a,以10进制方式赋值为123
6 | int b = 0567; //定义变量b,以8进制方式赋值为0567
7 | int c = 0xabc; //定义变量c,以16进制方式赋值为0xabc
8 |
9 | printf("a = %d\n", a);
10 | printf("8进制:b = %o\n", b);
11 | printf("10进制:b = %d\n", b);
12 | printf("16进制:c = %x\n", c);
13 | printf("16进制:c = %X\n", c);
14 | printf("10进制:c = %d\n", c);
15 |
16 | unsigned int d = 0xffffffff; //定义无符号int变量d,以16进制方式赋值
17 | printf("有符号方式打印:d = %d\n", d);
18 | printf("无符号方式打印:d = %u\n", d);
19 | return 0;
20 | }
21 |
--------------------------------------------------------------------------------
/code/2/2.2.2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/2/2.2.2
--------------------------------------------------------------------------------
/code/2/2.2.2.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main()
4 | {
5 | int a;
6 | printf("请输入a的值:");
7 |
8 | //不要加"\n"
9 | scanf("%d", &a);
10 | printf("a = %d\n", a); //打印a的值
11 |
12 | return 0;
13 | }
14 |
--------------------------------------------------------------------------------
/code/2/2.2.3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/2/2.2.3
--------------------------------------------------------------------------------
/code/2/2.2.3.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main()
4 | {
5 | short a = 10;
6 | int b = 10;
7 | long c = 10l; //或者10L
8 | long long d = 10ll; //或者10LL
9 |
10 | printf("sizeof(a) = %u\n", sizeof(a));
11 | printf("sizeof(b) = %u\n", sizeof(b));
12 | printf("sizeof(c) = %u\n", sizeof(c));
13 | printf("sizeof(c) = %u\n", sizeof(d));
14 |
15 | printf("short a = %hd\n", a);
16 | printf("int b = %d\n", b);
17 | printf("long c = %ld\n", c);
18 | printf("long long d = %lld\n", d);
19 |
20 | unsigned short a2 = 20u;
21 | unsigned int b2 = 20u;
22 | unsigned long c2= 20ul;
23 | unsigned long long d2 = 20ull;
24 |
25 | printf("unsigned short a = %hu\n", a2);
26 | printf("unsigned int b = %u\n", b2);
27 | printf("unsigned long c = %lu\n", c2);
28 | printf("unsigned long long d = %llu\n", d2);
29 |
30 | return 0;
31 | }
32 |
33 |
--------------------------------------------------------------------------------
/code/2/2.2.4-1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/2/2.2.4-1
--------------------------------------------------------------------------------
/code/2/2.2.4-1.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main()
4 | {
5 | signed int a = -1089474374; //定义有符号整型变量a
6 | printf("%X\n", a); //结果为 BF0FF0BA
7 |
8 | //B F 0 F F 0 B A
9 | //1011 1111 0000 1111 1111 0000 1011 1010
10 |
11 | return 0;
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/code/2/2.3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/2/2.3
--------------------------------------------------------------------------------
/code/2/2.3.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main()
4 | {
5 | int a;
6 | int b = sizeof(a);//sizeof得到指定值占用内存的大小,单位:字节
7 | printf("b = %d\n", b);
8 |
9 | size_t c = sizeof(a);
10 | printf("c = %u\n", c);//用无符号数的方式输出c的值
11 |
12 | return 0;
13 | }
14 |
15 |
--------------------------------------------------------------------------------
/code/2/2.4.1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/2/2.4.1
--------------------------------------------------------------------------------
/code/2/2.4.1.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main()
4 | {
5 | char ch = 'a';
6 | printf("sizeof(ch) = %u\n", sizeof(ch));
7 |
8 | printf("ch[%%c] = %c\n", ch); //打印字符
9 | printf("ch[%%d] = %d\n", ch); //打印‘a’ ASCII的值
10 |
11 | char A = 'A';
12 | char a = 'a';
13 | printf("a = %d\n", a); //97
14 | printf("A = %d\n", A); //65
15 |
16 | printf("A = %c\n", 'a' - 32); //小写a转大写A
17 | printf("a = %c\n", 'A' + 32); //大写A转小写a
18 |
19 | ch = ' ';
20 | printf("空字符:%d\n", ch); //空字符ASCII的值为32
21 | printf("A = %c\n", 'a' - ' '); //小写a转大写A
22 | printf("a = %c\n", 'A' + ' '); //大写A转小写a
23 |
24 | return 0;
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/code/2/2.4.2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/2/2.4.2
--------------------------------------------------------------------------------
/code/2/2.4.2.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main()
4 | {
5 | char ch;
6 | printf("请输入ch的值:");
7 |
8 | //不要加“\n”
9 | scanf("%c", &ch);
10 | printf("ch = %c\n", ch); //打印ch的字符
11 |
12 | return 0;
13 | }
14 |
--------------------------------------------------------------------------------
/code/2/2.4.4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/2/2.4.4
--------------------------------------------------------------------------------
/code/2/2.4.4.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main()
4 | {
5 | printf("abc");
6 | printf("\refg\n"); //\r切换到句首, \n为换行键
7 |
8 | printf("abc");
9 | printf("\befg\n");//\b为退格键, \n为换行键
10 |
11 | printf("%d\n", '\123');// '\123'为8进制转义字符,0123对应10进制数为83
12 | printf("%d\n", '\x23');// '\x23'为16进制转义字符,0x23对应10进制数为35
13 |
14 | return 0;
15 | }
16 |
17 |
--------------------------------------------------------------------------------
/code/2/2.5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/2/2.5
--------------------------------------------------------------------------------
/code/2/2.5.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main()
4 | {
5 | //传统方式赋值
6 | float a = 3.14f; //或3.14F
7 | double b = 3.14;
8 |
9 | printf("a = %f\n", a);
10 | printf("b = %lf\n", b);
11 |
12 | //科学法赋值
13 | a = 3.2e3f; //3.2*1000 = 3200,e可以写E
14 | printf("a1 = %f\n", a);
15 |
16 | a = 100e-3f; //100*0.001 = 0.1
17 | printf("a2 = %f\n", a);
18 |
19 | a = 3.1415926f;
20 | printf("a3 = %f\n", a); //结果为3.141593
21 |
22 | return 0;
23 | }
24 |
--------------------------------------------------------------------------------
/code/2/2.6.4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/2/2.6.4
--------------------------------------------------------------------------------
/code/2/2.6.4.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main()
4 | {
5 | int a = 123; //十进制方式赋值
6 | int b = 0123; //八进制方式赋值, 以数字0开头
7 | int c = 0xABC; //十六进制方式赋值
8 |
9 | //如果在printf中输出一个十进制数那么用%d,八进制用%o,十六进制是%x
10 | printf("十进制:%d\n",a );
11 | printf("八进制:%o\n", b); //%o,为字母o,不是数字
12 | printf("十六进制:%x\n", c);
13 |
14 | return 0;
15 | }
16 |
17 |
--------------------------------------------------------------------------------
/code/2/2.7.5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/2/2.7.5
--------------------------------------------------------------------------------
/code/2/2.7.5.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main()
4 | {
5 | char ch;
6 |
7 | //符号位溢出会导致数的正负发生改变
8 | ch = 0x7f + 2; //127+2
9 | printf("%d\n", ch);
10 | // 0111 1111
11 | //+2后 1000 0001,这是负数补码,其原码为 1111 1111,结果为-127
12 |
13 | //最高位的溢出会导致最高位丢失
14 | unsigned char ch2;
15 | ch2 = 0xff+1; //255+1
16 | printf("%u\n", ch2);
17 | // 1111 1111
18 | //+1后 10000 0000, char只有8位最高位的溢出,结果为0000 0000,十进制为0
19 |
20 | ch2 = 0xff + 2; //255+1
21 | printf("%u\n", ch2);
22 | // 1111 1111
23 | //+1后 10000 0001, char只有8位最高位的溢出,结果为0000 0001,十进制为1
24 |
25 | return 0;
26 | }
27 |
--------------------------------------------------------------------------------
/code/2/2.9.2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/2/2.9.2
--------------------------------------------------------------------------------
/code/2/2.9.2.c:
--------------------------------------------------------------------------------
1 | #include
2 | int main()
3 | {
4 | int a = 100;
5 | printf("a = %d\n", a);//格式化输出一个字符串
6 | printf("%p\n", &a);//输出变量a在内存中的地址编号
7 | printf("%%d\n");
8 |
9 | char c = 'a';
10 | putchar(c);//putchar只有一个参数,就是要输出的char
11 | long a2 = 100;
12 | printf("%ld, %lx, %lo\n", a2, a2, a2);
13 |
14 | long long a3 = 1000;
15 | printf("%lld, %llx, %llo\n", a3, a3, a3);
16 |
17 | int abc = 10;
18 | printf("abc = '%6d'\n", abc);
19 | printf("abc = '%-6d'\n", abc);
20 | printf("abc = '%06d'\n", abc);
21 | printf("abc = '%-06d'\n", abc);
22 |
23 | double d = 12.3;
24 | printf("d = \' %-10.3lf \'\n", d);
25 |
26 | return 0;
27 | }
28 |
--------------------------------------------------------------------------------
/code/2/2.9.3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/2/2.9.3
--------------------------------------------------------------------------------
/code/2/2.9.3.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main()
4 | {
5 | char ch1;
6 | char ch2;
7 | char ch3;
8 | int a;
9 | int b;
10 |
11 | printf("请输入ch1的字符:");
12 | ch1 = getchar();
13 | printf("ch1 = %c\n", ch1);
14 |
15 | getchar(); //测试此处getchar()的作用
16 |
17 | printf("请输入ch2的字符:");
18 | ch2 = getchar();
19 | printf("\'ch2 = %ctest\'\n", ch2);
20 |
21 | getchar(); //测试此处getchar()的作用
22 | printf("请输入ch3的字符:");
23 | scanf("%c", &ch3);//这里第二个参数一定是变量的地址,而不是变量名
24 | printf("ch3 = %c\n", ch3);
25 |
26 | printf("请输入a的值:");
27 | scanf("%d", &a);
28 | printf("a = %d\n", a);
29 |
30 | printf("请输入b的值:");
31 | scanf("%d", &b);
32 | printf("b = %d\n", b);
33 |
34 | return 0;
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/code/3/3.7.1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/3/3.7.1
--------------------------------------------------------------------------------
/code/3/3.7.1.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main(){
4 | int num = 5;
5 | printf("S1 = %d\n", num / 2);
6 | printf("S2 = %lf\n", num / 2.0);
7 |
8 | return 0;
9 | }
10 |
--------------------------------------------------------------------------------
/code/3/3.7.2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/3/3.7.2
--------------------------------------------------------------------------------
/code/3/3.7.2.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main(){
4 | float x = 0;
5 | int i = 0;
6 | x = 3.6f;
7 |
8 | i = x;
9 | i = (int)x;
10 |
11 | printf("x=%f, i=%d\n", x, i);
12 |
13 | return 0;
14 | }
15 |
--------------------------------------------------------------------------------
/code/4/4.2.5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/4/4.2.5
--------------------------------------------------------------------------------
/code/4/4.2.5.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main()
4 | {
5 | char c;
6 | c = getchar();
7 |
8 | switch (c) //参数只能是整型变量
9 | {
10 | case '1':
11 | printf("OK\n");
12 | break;//switch遇到break就中断了
13 | case '2':
14 | printf("not OK\n");
15 | break;
16 | default://如果上面的条件都不满足,那么执行default
17 | printf("are u ok?\n");
18 | }
19 | return 0;
20 | }
21 |
--------------------------------------------------------------------------------
/code/4/4.3.1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/4/4.3.1
--------------------------------------------------------------------------------
/code/4/4.3.1.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main()
4 | {
5 | int i = 0;
6 | while (1)
7 | {
8 | i++;
9 | printf("i = %d\n", i);
10 |
11 | if (i == 10)
12 | {
13 | break; //跳出while循环
14 | }
15 | }
16 |
17 | int flag = 0;
18 | int m = 0;
19 | int n = 0;
20 |
21 | for (m = 0; m < 10; m++)
22 | {
23 | for (n = 0; n < 10; n++)
24 | {
25 | if (n == 5)
26 | {
27 | flag = 1;
28 | break; //跳出for (n = 0; n < 10; n++)
29 | }
30 | }
31 |
32 | if (flag == 1)
33 | {
34 | break; //跳出for (m = 0; m < 10; m++)
35 | }
36 | }
37 |
38 | return 0;
39 | }
40 |
41 |
--------------------------------------------------------------------------------
/code/4/4.4.2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/4/4.4.2
--------------------------------------------------------------------------------
/code/4/4.4.2.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main()
4 | {
5 | int sum = 0; //定义变量sum
6 |
7 | for (int i = 1; i <= 100; i++)
8 | {
9 | if (i % 2 == 0) //如果i是一个偶数,执行if语句中的代码
10 | {
11 | continue; //结束本次循环
12 | }
13 | sum += i; //实现sum和i的累加
14 | }
15 |
16 | printf("sum = %d\n", sum);
17 |
18 | return 0;
19 | }
20 |
21 |
--------------------------------------------------------------------------------
/code/4/4.4.3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/4/4.4.3
--------------------------------------------------------------------------------
/code/4/4.4.3.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main()
4 | {
5 | goto End; //无条件跳转到End的标识
6 | printf("aaaaaaaaa\n");
7 |
8 | End:
9 | printf("bbbbbbbb\n");
10 |
11 | return 0;
12 | }
13 |
--------------------------------------------------------------------------------
/code/5/5.2.1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/5/5.2.1
--------------------------------------------------------------------------------
/code/5/5.2.1.c:
--------------------------------------------------------------------------------
1 | #include
2 | int main(){
3 | int a[10];
4 | a[0] = 0;
5 |
6 | a[9] = 9;
7 |
8 | int i = 0;
9 | for(i=0;i<10;i++){
10 | a[i] = i;
11 | }
12 |
13 | for(i=0;i<10;i++){
14 | printf("%d", a[i]);
15 | }
16 | printf("\n");
17 |
18 | return 0;
19 | }
20 |
--------------------------------------------------------------------------------
/code/5/5.2.3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/5/5.2.3
--------------------------------------------------------------------------------
/code/5/5.2.3.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main(){
4 | int a[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
5 | // 定义一个数组,同时初始化所有成员变量
6 | printf("a = %p\n", a);
7 | printf("&a[0]=%p\n", &a[0]);
8 |
9 | int n = sizeof(a);
10 | int n0 = sizeof(a[0]);
11 |
12 | int i = 0;
13 | for(i = 0;i < sizeof(a) / sizeof(a[0]); i++){
14 | printf("%d", a[i]);
15 | }
16 | printf("\n");
17 |
18 | return 0;
19 | }
20 |
--------------------------------------------------------------------------------
/code/5/5.2.4-1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/5/5.2.4-1
--------------------------------------------------------------------------------
/code/5/5.2.4-1.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main(){
4 | int a[] = {1, -2, 3, -4, 5, -6, 7, -8, -9, 10};
5 | int i = 0;
6 | int max = a[0];
7 | for(i=1;i max){
9 | max = a[i];
10 | }
11 | }
12 |
13 | printf("数组中最大值为:%d\n", max);
14 |
15 | return 0;
16 | }
17 |
--------------------------------------------------------------------------------
/code/5/5.2.4-2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/5/5.2.4-2
--------------------------------------------------------------------------------
/code/5/5.2.4-2.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main(){
4 | int a[] = { 1, -2, 3,- 4, 5, -6, 7, -8, -9, 10 };
5 | int i = 0;
6 | int j = sizeof(a) / sizeof(a[0]) - 1;
7 | int tmp;
8 |
9 | while (i < j){
10 | tmp = a[i];
11 | a[i] = a[j];
12 | a[j] = tmp;
13 | i++;
14 | j--;
15 | }
16 | for(i = 0; i < sizeof(a)/sizeof(a[0]); i++){
17 | printf("%d, ", a[i]);
18 | }
19 | printf("\n");
20 |
21 | return 0;
22 | }
23 |
--------------------------------------------------------------------------------
/code/5/5.2.4-3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/5/5.2.4-3
--------------------------------------------------------------------------------
/code/5/5.2.4-3.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main()
4 | {
5 | int a[] = { 1, -2, 3,- 4, 5, -6, 7, -8, -9, 10 };
6 | int i = 0;
7 | int j = 0;
8 | int n = sizeof(a)/sizeof(a[0]);
9 | int tmp;
10 |
11 | // 1. 流程
12 | // 2. 试数
13 | for(i = 0; i < n; i++)
14 | {
15 | for(j = 0; j < n - i - 1; j++)
16 | {
17 | if(a[j] > a[j+1])
18 | {
19 | tmp = a[j];
20 | a[j] = a[j+1];
21 | a[j+1] = tmp;
22 | }
23 | }
24 | }
25 |
26 | for(i = 0; i < n; i++)
27 | {
28 | printf("%d",a[i]);
29 | }
30 | printf("\n");
31 |
32 | return 0;
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/code/5/5.3.3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/5/5.3.3
--------------------------------------------------------------------------------
/code/5/5.3.3.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main()
4 | {
5 | //定义了一个二维数组,名字叫a
6 | //二维数组是本质上还是一维数组,此一维数组有3个元素
7 | //每个元素又是一个一维数组int[4]
8 | int a[3][4] = { 1, 2, 3, 4 , 5, 6, 7, 8, 9, 10, 11, 12 };
9 |
10 | //数组名为数组首元素地址,二维数组的第0个元素为一维数组
11 | //第0个一维数组的数组名为a[0]
12 | printf("a = %p\n", a);
13 | printf("a[0] = %p\n", a[0]);
14 |
15 | //测二维数组所占内存空间,有3个一维数组,每个一维数组的空间为4*4
16 | //sizeof(a) = 3 * 4 * 4 = 48
17 | printf("sizeof(a) = %d\n", sizeof(a));
18 |
19 | //测第0个元素所占内存空间,a[0]为第0个一维数组int[4]的数组名,4*4=16
20 | printf("sizeof(a[0]) = %d\n", sizeof(a[0]) );
21 |
22 | //测第0行0列元素所占内存空间,第0行0列元素为一个int类型,4字节
23 | printf("sizeof(a[0][0]) = %d\n", sizeof(a[0][0]));
24 |
25 | //求二维数组行数
26 | printf("i = %d\n", sizeof(a) / sizeof(a[0]));
27 |
28 | // 求二维数组列数
29 | printf("j = %d\n", sizeof(a[0]) / sizeof(a[0][0]));
30 |
31 | //求二维数组行*列总数
32 | printf("n = %d\n", sizeof(a) / sizeof(a[0][0]));
33 |
34 | return 0;
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/code/5/5.3.4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/5/5.3.4
--------------------------------------------------------------------------------
/code/5/5.3.4.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main()
4 | {
5 | //二维数组: 五行、三列
6 | //行代表人: 老大到老五
7 | //列代表科目:语、数、外
8 |
9 | float a[5][3] = { { 80, 75, 56 }, { 59, 65, 71 }, { 59, 63, 70 }, { 85, 45, 90 }, { 76, 77, 45 } };
10 |
11 | int i,j,person_low[3] = {0};
12 | float s=0,lesson_aver[3] = {0};
13 |
14 | for(i = 0; i < 3; i++)
15 | {
16 | for(j = 0;j < 5; j++)
17 | {
18 | s = s + a[i][j];
19 | if(a[i][j] < 60)
20 | {
21 | person_low[i]++;
22 | }
23 | }
24 | lesson_aver[i] = s/5;
25 | s = 0;
26 | }
27 | printf("各科的平均成绩:\n");
28 | for (i = 0; i < 3; i++)
29 | {
30 | printf("%.2f\n", lesson_aver[i]);
31 | }
32 |
33 | printf("各科不及格的人数:\n");
34 | for (i = 0; i < 3; i++)
35 | {
36 | printf("%d\n", person_low[i]);
37 | }
38 |
39 | return 0;
40 | }
41 |
--------------------------------------------------------------------------------
/code/5/5.4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/5/5.4
--------------------------------------------------------------------------------
/code/5/5.4.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main(){
4 | // int a[3][4][5]; //定义了一个三维数组,有3个二维数组int[4][5]
5 | int a[3][4][5] = { { { 1, 2, 3, 4, 5 }, { 6, 7, 8, 9, 10 }, { 0 }, { 0 } }, { { 0 }, { 0 }, { 0 }, { 0 } }, { { 0 }, { 0 }, { 0 }, { 0 } } };
6 | int i, j, k;
7 | for (i = 0; i < 3; i++)
8 | {
9 | for (j = 0; j < 4; j++)
10 | {
11 | for (k = 0; k < 5; k++)
12 | {
13 | //添加访问元素代码
14 | printf("%d, ", a[i][j][k]);
15 | }
16 | printf("\n");
17 | }
18 | }
19 | return 0;
20 | }
21 |
--------------------------------------------------------------------------------
/code/5/5.5.1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/5/5.5.1
--------------------------------------------------------------------------------
/code/5/5.5.1.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main()
4 | {
5 | char c1[] = { 'c', ' ', 'p', 'r', 'o', 'g' }; //普通字符数组
6 | printf("c1 = %s\n", c1); //乱码,因为没有’\0’结束符
7 |
8 | //以‘\0’(‘\0’就是数字0)结尾的字符数组是字符串
9 | char c2[] = { 'c', ' ', 'p', 'r', 'o', 'g', '\0'};
10 | printf("c2 = %s\n", c2);
11 |
12 | //字符串处理以‘\0’(数字0)作为结束符,后面的'h', 'l', 'l', 'e', 'o'不会输出
13 | char c3[] = { 'c', ' ', 'p', 'r', 'o', 'g', '\0', 'h', 'l', 'l', 'e', 'o', '\0'};
14 | printf("c3 = %s\n", c3);
15 |
16 | return 0;
17 | }
18 |
--------------------------------------------------------------------------------
/code/5/5.5.2.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | // C语言没有字符串类型,通过字符数组模拟
4 | // C语言字符串,以字符'\0', 数字0
5 |
6 | int main()
7 | {
8 | //不指定长度, 没有0结束符,有多少个元素就有多长
9 | char buf[] = {'a', 'b', 'c'};
10 | printf("buf = %s\n", buf); //乱码
11 |
12 | //指定长度,后面没有赋值的元素,自动补0
13 | char buf2[100] = { 'a', 'b', 'c' };
14 | char buf[1000]={"hello"};
15 | printf("buf2 = %s\n", buf2);
16 |
17 | //所有元素赋值为0
18 | char buf3[100] = { 0 };
19 | //char buf4[2] = { '1', '2', '3' };//数组越界
20 | char buf5[50] = { '1', 'a', 'b', '0', '7' };
21 | printf("buf5 = %s\n", buf5);
22 |
23 | char buf6[50] = { '1', 'a', 'b', 0, '7' };
24 | printf("buf6 = %s\n", buf6);
25 |
26 | char buf7[50] = { '1', 'a', 'b', '\0', '7' };
27 | printf("buf7 = %s\n", buf7);
28 |
29 | //使用字符串初始化,编译器自动在后面补0,常用
30 | char buf8[] = "agjdslgjlsdjg";
31 |
32 | //'\0'后面最好不要连着数字,有可能几个数字连起来刚好是一个转义字符
33 | //'\ddd'八进制字义字符,'\xdd'十六进制转移字符
34 | // \012相当于\n
35 | char str[] = "\012abc";
36 | printf("str == %s\n", str);
37 |
38 | return 0;
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/code/5/5.5.3-5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/5/5.5.3-5
--------------------------------------------------------------------------------
/code/5/5.5.3-5.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | int main()
5 | {
6 | char str[] = "abc\0defg";
7 | int n = strlen(str);
8 | printf("n = %d\n", n);
9 |
10 | return 0;
11 | }
12 |
--------------------------------------------------------------------------------
/code/6/6.1.2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/6/6.1.2
--------------------------------------------------------------------------------
/code/6/6.1.2.c:
--------------------------------------------------------------------------------
1 | #include
2 | // 求两数的最大值
3 | int max(int a, int b)
4 | {
5 | if (a > b)
6 | {
7 | return a;
8 | }
9 | else
10 | {
11 | return b;
12 | }
13 | }
14 |
15 | int main()
16 | {
17 | int a1 = 10, b1 = 20, c1 = 0;
18 | c1 = max(a1, b1); // 调用max()
19 |
20 | int a2 = 11, b2 = 21, c2 = 0;
21 | c2 = max(a2, b2);
22 |
23 |
24 | printf("c1= %d, c2 = %d\n",c1, c2);
25 | return 0;
26 | }
27 |
--------------------------------------------------------------------------------
/code/7/7.2.1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/7/7.2.1
--------------------------------------------------------------------------------
/code/7/7.2.1.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main()
4 | {
5 | int a = 0;
6 | char b = 100;
7 |
8 | printf("%p, %p\n", &a, &b);
9 |
10 | int *p;
11 | p = &a;
12 |
13 | printf("%d\n", *p);
14 |
15 | char *p1 = &b;
16 | printf("%d\n", *p1);
17 |
18 | return 0;
19 | }
20 |
--------------------------------------------------------------------------------
/code/7/7.2.3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/7/7.2.3
--------------------------------------------------------------------------------
/code/7/7.2.3.c:
--------------------------------------------------------------------------------
1 | #include
2 | int main()
3 | {
4 | int *p1;
5 | int **p2;
6 | char *p3;
7 | char **p4;
8 |
9 | printf("sizeof(p1) = %d\n", sizeof(p1));
10 | printf("sizeof(p2) = %d\n", sizeof(p2));
11 | printf("sizeof(p3) = %d\n", sizeof(p3));
12 | printf("sizeof(p4) = %d\n", sizeof(p4));
13 | printf("sizeof(double *) = %d\n", sizeof(double *));
14 |
15 | return 0;
16 | }
17 |
--------------------------------------------------------------------------------
/code/7/7.3.2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/7/7.3.2
--------------------------------------------------------------------------------
/code/7/7.3.2.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main()
4 | {
5 | int a[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
6 | int i = 0;
7 | int n = sizeof(a)/sizeof(a[0]);
8 |
9 | for(i = 0; i < n; i++)
10 | {
11 | // printf("%d, " a[i]);
12 | printf("%d,", *(a+i));
13 | }
14 | printf("\n");
15 |
16 | int *p = a;
17 | for(i = 0; i < n; i++)
18 | {
19 | p[i] = 2 * i;
20 | }
21 |
22 | for(i = 0; i < n; i++)
23 | {
24 | printf("%d", *(p+i));
25 | }
26 | printf("\n");
27 |
28 | return 0;
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/code/7/7.3.3-2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/7/7.3.3-2
--------------------------------------------------------------------------------
/code/7/7.3.3-2.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main()
4 | {
5 | int a[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
6 | int i = 0;
7 | int n = sizeof(a) / sizeof(a[0]);
8 |
9 | int *p = a+n-1;
10 | for (i = 0; i < n; i++)
11 | {
12 | printf("%d, ", *p);
13 | p--;
14 | }
15 | printf("\n");
16 |
17 | return 0;
18 | }
19 |
20 |
--------------------------------------------------------------------------------
/code/7/7.5.1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/7/7.5.1
--------------------------------------------------------------------------------
/code/7/7.5.1.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | void swap1(int x, int y)
4 | {
5 | int tmp;
6 | tmp = x;
7 | x = y;
8 | y = tmp;
9 | printf("x=%d, y=%d\n", x, y);
10 | }
11 | void swap2(int *x, int *y)
12 | {
13 | int tmp;
14 | tmp = *x;
15 | *x = *y;
16 | *y = tmp;
17 | }
18 | int main()
19 | {
20 | int a = 3;
21 | int b = 5;
22 | swap1(a, b); // 值传递
23 | printf("a = %d, b = %d\n", a, b);
24 |
25 | a = 3;
26 | b = 5;
27 | swap2(&a, &b); // 地址传递
28 | printf("a2 = %d, b2=%d\n", a, b);
29 |
30 | return 0;
31 | }
32 |
--------------------------------------------------------------------------------
/code/7/7.5.2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/7/7.5.2
--------------------------------------------------------------------------------
/code/7/7.5.2.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | void printArrary(int *a, int n)
4 | {
5 | int i = 0;
6 | for (i = 0; i < n; i++)
7 | {
8 | printf("%d, ", a[i]);
9 | }
10 | printf("\n");
11 | }
12 |
13 | int main()
14 | {
15 | int a[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
16 | int n = sizeof(a) / sizeof(a[0]);
17 |
18 | //数组名做函数参数
19 | printArrary(a, n);
20 | return 0;
21 | }
22 |
--------------------------------------------------------------------------------
/code/7/7.5.3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/7/7.5.3
--------------------------------------------------------------------------------
/code/7/7.5.3.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int a = 10;
4 |
5 | int *getA()
6 | {
7 | return &a;
8 | }
9 |
10 | int main()
11 | {
12 | *(getA()) = 111;
13 | printf("a = %d\n", a);
14 | // 输出: a = 111;
15 | return 0;
16 | }
17 |
--------------------------------------------------------------------------------
/code/7/7.5.5-1-a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/7/7.5.5-1-a
--------------------------------------------------------------------------------
/code/7/7.5.5-1-a.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 |
5 | int main(void)
6 | {
7 | char *p = "11abcd111122abcd333abcd3322abcd3333322qqq";
8 | int n = 0;
9 |
10 | while((p = strstr(p, "abcd")) != NULL)
11 | {
12 | //能进来,肯定有匹配的子串
13 | //重新设置起点位置
14 | p = p + strlen("abcd");
15 | n++;
16 |
17 | if(*p == 0) // 结束符
18 | {
19 | break;
20 | }
21 | }
22 | printf("n = %d\n", n);
23 |
24 | return 0;
25 | }
26 |
--------------------------------------------------------------------------------
/code/7/7.6.1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/7/7.6.1
--------------------------------------------------------------------------------
/code/7/7.6.1.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main()
4 | {
5 | char str[] = "hello world";
6 | char *p = str;
7 | *p = 'm';
8 | p++;
9 | *p='i';
10 | printf("%s\n", str);
11 |
12 | p = "mike Tao";
13 | printf("%s\n", p);
14 |
15 | char *q = "test";
16 | printf("%s\n", q);
17 |
18 | return 0;
19 | }
20 |
--------------------------------------------------------------------------------
/code/7/7.6.5-2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/7/7.6.5-2
--------------------------------------------------------------------------------
/code/7/7.6.5-2.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 |
6 | int fun(char *p, int *n)
7 | {
8 | if(p == NULL || n == NULL)
9 | {
10 | return -1;
11 | }
12 | int begin = 0;
13 | int end = strlen(p) - 1;
14 |
15 | //从左边开始
16 | //如果当前字符为空,而且没有结束
17 | while(p[begin] == ' ' && p[begin] != 0)
18 | {
19 | begin++;
20 | }
21 |
22 | //从右往左移动
23 | while (p[end] == ' ' && end > 0)
24 | {
25 | end--; //往左移动
26 | }
27 |
28 |
29 | if (end == 0)
30 | {
31 | return -2;
32 | }
33 |
34 | //非空元素个数
35 | *n = end - begin + 1;
36 |
37 | return 0;
38 | }
39 |
40 |
41 | int main(void)
42 | {
43 | char *p = " abcddsgadsgefg ";
44 | int ret = 0;
45 | int n = 0;
46 |
47 | ret = fun(p, &n);
48 | if(ret != 0)
49 | {
50 | return ret;
51 | }
52 | printf("非空字符串元素个数:%d\n", n);
53 |
54 | return 0;
55 | }
56 |
--------------------------------------------------------------------------------
/code/7/7.6.5-3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/7/7.6.5-3
--------------------------------------------------------------------------------
/code/7/7.6.5-3.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 |
5 | int inverse(char *p)
6 | {
7 | if(p == NULL)
8 | {
9 | return -1;
10 | }
11 | char *str = p;
12 | int begin = 0;
13 | int end = strlen(str) - 1;
14 | char tmp;
15 |
16 | while(begin < end)
17 | {
18 | // 交换元素
19 | tmp = str[begin];
20 | str[begin] = str[end];
21 | str[end] = tmp;
22 |
23 | begin++; //往右移动位置
24 | end--; // 往左移动位置
25 | }
26 |
27 | return 0;
28 | }
29 | int main(void)
30 | {
31 | //char *str = "abcdefg"; //文件常量区,内容不允许修改
32 | char str[] = "abcdef";
33 |
34 | int ret = inverse(str);
35 |
36 | if(ret != 0)
37 | {
38 | return ret;
39 | }
40 |
41 | printf("str = %s\n", str);
42 |
43 | return 0;
44 | }
45 |
--------------------------------------------------------------------------------
/code/7/7.6.5.1-2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/7/7.6.5.1-2
--------------------------------------------------------------------------------
/code/7/7.6.5.1-2.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 |
5 | int main(void)
6 | {
7 | char *p = "11abcd111122abcd333abcd3322abcd3333322qqq";
8 | int n = 0;
9 |
10 | do
11 | {
12 | p = strstr(p, "abcd");
13 | if(p != NULL)
14 | {
15 | n++;
16 | // 重新设置查找的起点
17 | p = p + strlen("abcd");
18 | }
19 | else
20 | {
21 | break;
22 | }
23 | }while(*p != 0);
24 |
25 | printf("n=%d\n", n);
26 |
27 | return 0;
28 | }
29 |
--------------------------------------------------------------------------------
/code/7/7.6.6-9:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/7/7.6.6-9
--------------------------------------------------------------------------------
/code/7/7.6.6-9.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main()
4 | {
5 |
6 | char src[] = "ddda123abcd";
7 | char *p = strchr(src, 'a');
8 | printf("p = %s\n", p);
9 |
10 | return 0;
11 | }
12 |
--------------------------------------------------------------------------------
/code/7/7.7.3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/7/7.7.3
--------------------------------------------------------------------------------
/code/7/7.7.3.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | void mystract(char *dest, const char *src)
4 | {
5 | int len1 = 0;
6 | int len2 = 0;
7 | while(dest[len1])
8 | {
9 | len1++;
10 | }
11 | while(src[len2])
12 | {
13 | len2++;
14 | }
15 | int i;
16 | for(i = 0; i < len2; i++)
17 | {
18 | dest[len1 + i] = src[i];
19 | }
20 | }
21 |
22 | int main()
23 | {
24 | char dst[100] = "hello mike";
25 | char src[] = "123456";
26 |
27 | mystract(dst,src);
28 | printf("dst = %s\n", dst);
29 |
30 | return 0;
31 | }
32 |
--------------------------------------------------------------------------------
/code/8/8.1.2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/8/8.1.2
--------------------------------------------------------------------------------
/code/8/8.1.2.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | void fun1()
4 | {
5 | int i = 0;
6 | i++;
7 | printf("i = %d\n", i);
8 | }
9 | void fun2()
10 | {
11 | // 静态局部变量,没有赋值,系统赋值为0,而且只会初始化一次
12 | static int a;
13 | a++;
14 | printf("a = %d\n");
15 | }
16 |
17 | int main(void)
18 | {
19 | fun1();
20 | fun1();
21 | fun2();
22 | fun2();
23 |
24 | return 0;
25 | }
26 |
--------------------------------------------------------------------------------
/code/8/8.2.2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/8/8.2.2
--------------------------------------------------------------------------------
/code/8/8.2.2.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | int e;
5 | static int f;
6 | int g = 10;
7 | static int h = 10;
8 |
9 | int main()
10 | {
11 | int a;
12 | int b = 10;
13 | static int c;
14 | static int d = 10;
15 | char *i = "test";
16 | char *k = NULL;
17 |
18 | printf("&a\t %p\t //局部未初始化变量\n", &a);
19 | printf("&b\t %p\t //局部初始化变量\n", &b);
20 |
21 | printf("&c\t %p\t //静态局部未初始化变量\n", &c);
22 | printf("&d\t %p\t //静态局部初始化变量\n", &d);
23 |
24 | printf("&e\t %p\t //全局未初始化变量\n", &e);
25 | printf("&f\t %p\t //全局静态未初始化变量\n", &f);
26 |
27 | printf("&g\t %p\t //全局初始化变量\n", &g);
28 | printf("&h\t %p\t //全局静态初始化变量\n", &h);
29 |
30 | printf("i\t %p\t //只读数据(文字常量区)\n", i);
31 |
32 | k = (char *)malloc(10);
33 | printf("k\t %p\t //动态分配的内存\n", k);
34 |
35 | return 0;
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/code/8/8.2.4-1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/8/8.2.4-1
--------------------------------------------------------------------------------
/code/8/8.2.4-1.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 |
5 | int main()
6 | {
7 | int count, *array, n;
8 | printf("请输入要申请数组的个数:\n");
9 | scanf("%d", &n);
10 |
11 | array = (int *)malloc(n * sizeof(int));
12 | if(array == NULL)
13 | {
14 | printf("申请空间失败!\n");
15 | return -1;
16 | }
17 | //将申请到空间清0
18 | memset(array, 0, sizeof(int)*n);
19 |
20 | for(count = 0; count < n; count++)
21 | array[count] = count;
22 | for(count = 0; count < n; count++)
23 | printf("%2d", array[count]);
24 |
25 | free(array);
26 |
27 | return 0;
28 |
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/code/9/10.5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/9/10.5
--------------------------------------------------------------------------------
/code/9/10.5.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main(int argc, char **args)
4 | {
5 | if(argc < 2)
6 | return 0;
7 | FILE *p = fopen(args[1], "rb");
8 | if(!p)
9 | return 0;
10 | char a[1024] = {0};
11 | fgets(a, sizeof(a),p);
12 |
13 | int len = 0;
14 | while(a[len])
15 | {
16 | if(a[len] == '\n')
17 | {
18 | if(a[len - 1] == '\r')
19 | {
20 | printf("windows file\n");
21 | }else
22 | {
23 | printf("linux file\n");
24 | }
25 | }
26 | }
27 |
28 | fclose(p);
29 |
30 | return 0;
31 | }
32 |
--------------------------------------------------------------------------------
/code/9/9.3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/code/9/9.3
--------------------------------------------------------------------------------
/code/9/9.3.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | enum weekday
4 | {
5 | sun = 2, mon, tue, wed, thu, fri, sat
6 | };
7 | enum bool
8 | {
9 | false, true
10 | };
11 |
12 | int main()
13 | {
14 | enum weekday a,b,c;
15 | a = sun;
16 | b = mon;
17 | c = tue;
18 |
19 | printf("%d,%d,%d\n", a, b, c);
20 |
21 | enum bool flag;
22 | flag = true;
23 |
24 | if(flag == 1)
25 | {
26 | printf("flag为真\n");
27 | }
28 |
29 | return 0;
30 | }
31 |
--------------------------------------------------------------------------------
/docs/C基础讲义.doc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/docs/C基础讲义.doc
--------------------------------------------------------------------------------
/docs/C语言标准库函数大全.chm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/docs/C语言标准库函数大全.chm
--------------------------------------------------------------------------------
/img/2-1Q11512525J14.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/2-1Q11512525J14.gif
--------------------------------------------------------------------------------
/img/clip_image002-1600476727438.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1600476727438.jpg
--------------------------------------------------------------------------------
/img/clip_image002-1600476849331.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1600476849331.jpg
--------------------------------------------------------------------------------
/img/clip_image002-1600476855287.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1600476855287.jpg
--------------------------------------------------------------------------------
/img/clip_image002-1600476859772.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1600476859772.jpg
--------------------------------------------------------------------------------
/img/clip_image002-1600480373517.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1600480373517.png
--------------------------------------------------------------------------------
/img/clip_image002-1600484267948.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1600484267948.jpg
--------------------------------------------------------------------------------
/img/clip_image002-1600484293600.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1600484293600.jpg
--------------------------------------------------------------------------------
/img/clip_image002-1600484648234.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1600484648234.jpg
--------------------------------------------------------------------------------
/img/clip_image002-1600495561286.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1600495561286.jpg
--------------------------------------------------------------------------------
/img/clip_image002-1600500777852.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1600500777852.png
--------------------------------------------------------------------------------
/img/clip_image002-1600500801245.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1600500801245.jpg
--------------------------------------------------------------------------------
/img/clip_image002-1600500855480.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1600500855480.jpg
--------------------------------------------------------------------------------
/img/clip_image002-1600500866476.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1600500866476.jpg
--------------------------------------------------------------------------------
/img/clip_image002-1600501357582.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1600501357582.jpg
--------------------------------------------------------------------------------
/img/clip_image002-1600501365915.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1600501365915.jpg
--------------------------------------------------------------------------------
/img/clip_image002-1600502184471.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1600502184471.jpg
--------------------------------------------------------------------------------
/img/clip_image002-1600502207939.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1600502207939.jpg
--------------------------------------------------------------------------------
/img/clip_image002-1600503616364.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1600503616364.jpg
--------------------------------------------------------------------------------
/img/clip_image002-1600565386733.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1600565386733.jpg
--------------------------------------------------------------------------------
/img/clip_image002-1600565899951.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1600565899951.png
--------------------------------------------------------------------------------
/img/clip_image002-1600565955370.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1600565955370.png
--------------------------------------------------------------------------------
/img/clip_image002-1600565985028.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1600565985028.png
--------------------------------------------------------------------------------
/img/clip_image002-1600566360348.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1600566360348.png
--------------------------------------------------------------------------------
/img/clip_image002-1600566398556.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1600566398556.png
--------------------------------------------------------------------------------
/img/clip_image002-1600570691948.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1600570691948.png
--------------------------------------------------------------------------------
/img/clip_image002-1600585634394.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1600585634394.png
--------------------------------------------------------------------------------
/img/clip_image002-1600753669406.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1600753669406.jpg
--------------------------------------------------------------------------------
/img/clip_image002-1600778555216.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1600778555216.jpg
--------------------------------------------------------------------------------
/img/clip_image002-1600782355725.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1600782355725.png
--------------------------------------------------------------------------------
/img/clip_image002-1600782473718.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1600782473718.png
--------------------------------------------------------------------------------
/img/clip_image002-1600937546831.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1600937546831.png
--------------------------------------------------------------------------------
/img/clip_image002-1601020859989.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1601020859989.jpg
--------------------------------------------------------------------------------
/img/clip_image002-1601021875042.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1601021875042.jpg
--------------------------------------------------------------------------------
/img/clip_image002-1601038402799.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1601038402799.jpg
--------------------------------------------------------------------------------
/img/clip_image002-1601038507385.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1601038507385.jpg
--------------------------------------------------------------------------------
/img/clip_image002-1601113908804.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1601113908804.jpg
--------------------------------------------------------------------------------
/img/clip_image002-1601123785585.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1601123785585.png
--------------------------------------------------------------------------------
/img/clip_image002-1601131241385.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1601131241385.jpg
--------------------------------------------------------------------------------
/img/clip_image002-1601131628499.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1601131628499.jpg
--------------------------------------------------------------------------------
/img/clip_image002-1601186383431.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002-1601186383431.jpg
--------------------------------------------------------------------------------
/img/clip_image002.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002.jpg
--------------------------------------------------------------------------------
/img/clip_image002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/clip_image002.png
--------------------------------------------------------------------------------
/img/image-20200919090134713.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/image-20200919090134713.png
--------------------------------------------------------------------------------
/img/image-20200919092034856.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/image-20200919092034856.png
--------------------------------------------------------------------------------
/img/image-20200919094712699.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/image-20200919094712699.png
--------------------------------------------------------------------------------
/img/image-20200919101105887.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/image-20200919101105887.png
--------------------------------------------------------------------------------
/img/image-20200919101944251.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/image-20200919101944251.png
--------------------------------------------------------------------------------
/img/image-20200919102259922.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/image-20200919102259922.png
--------------------------------------------------------------------------------
/img/image-20200919102850515.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/image-20200919102850515.png
--------------------------------------------------------------------------------
/img/image-20200919102938934.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/image-20200919102938934.png
--------------------------------------------------------------------------------
/img/image-20200919133924510.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/image-20200919133924510.png
--------------------------------------------------------------------------------
/img/image-20200920092724191.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/image-20200920092724191.png
--------------------------------------------------------------------------------
/img/image-20200920211035690.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/image-20200920211035690.png
--------------------------------------------------------------------------------
/img/image-20200925161021903.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Taonn/C-Learning/3038964345069aaa8113923e9f0f0585b13fe82c/img/image-20200925161021903.png
--------------------------------------------------------------------------------
/img/readme.txt:
--------------------------------------------------------------------------------
1 | C
2 |
--------------------------------------------------------------------------------