Skip to content

Commit a134067

Browse files
Create README.md
This page contains 100+ C programming source code examples. All the C programming source code examples are up to date and are well-tested in our development environment.
0 parents  commit a134067

File tree

1 file changed

+167
-0
lines changed

1 file changed

+167
-0
lines changed

README.md

+167
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
# C-Source-Code-Examples
2+
This page contains 100+ C programming source code examples. All the C programming source code examples are up to date and are well-tested in our development environment.
3+
<div>
4+
<br />
5+
<div>
6+
<div>We covered source code examples on various C programming language standard libraries:</div>
7+
<div>
8+
<ul style="text-align: left;">
9+
<li>&lt;stdio.h&gt;: Standard Input and Output library</li>
10+
<li>&lt;stdlib.h&gt;: Standard Library</li>
11+
<li>&lt;string.h&gt;: String Operations library</li>
12+
<li>&lt;math.h&gt;: Mathematics library</li>
13+
<li>&lt;time.h&gt;: Time library</li>
14+
<li>&lt;ctype.h&gt;: Character Type library</li>
15+
<li>&lt;errno.h&gt;: Error Number library</li>
16+
<li>&lt;assert.h&gt;: Assertion library</li>
17+
<li>&lt;limits.h&gt;: Sizes of Basic Types library</li>
18+
<li>&lt;setjmp.h&gt;: Jump library</li>
19+
<li>&lt;signal.h&gt;: Signals library</li>
20+
</ul>
21+
</div>
22+
<div>
23+
<h1>C Programming Examples</h1>
24+
<div>
25+
<ol>
26+
<li><a href="https://www.sourcecodeexamples.net/2022/06/what-is-algorithm-with-examples.html" target="_blank">What is an Algorithm with Examples</a></li>
27+
<li><a href="https://www.sourcecodeexamples.net/2022/06/what-is-flowchart-with-examples.html" target="_blank">What is a Flowchart with Examples</a></li>
28+
<li><a href="https://www.sourcecodeexamples.net/2022/06/differences-between-algorithm-and.html" target="_blank">Differences between Algorithm and Flowchart</a></li>
29+
<li><a href="https://www.sourcecodeexamples.net/2022/06/structure-of-c-program-with-example.html" target="_blank">Structure of C Program with Example</a></li>
30+
<li><a href="https://www.sourcecodeexamples.net/2022/06/c-printf-and-scanf-examples.html" target="_blank">C printf and scanf Examples</a></li>
31+
</ol>
32+
</div>
33+
<div>
34+
<h1 style="text-align: left;">Standard Input/Output Library Functions</h1>
35+
<p></p>
36+
<ol style="text-align: left;">
37+
<li><a href="https://www.sourcecodeexamples.net/2023/08/scanf-in-c-source-code-example.html" target="_blank">scanf() in C - Source Code Example</a></li>
38+
<li><a href="https://www.sourcecodeexamples.net/2023/08/printf-in-c-source-code-example.html" target="_blank">printf() in C - Source Code Example</a></li>
39+
<li><a href="https://www.sourcecodeexamples.net/2023/08/sprintf-in-c-source-code-example.html" target="_blank">sprintf() in C - Source Code Example</a></li>
40+
<li><a href="https://www.sourcecodeexamples.net/2023/08/sscanf-in-c-source-code-example.html" target="_blank">sscanf() in C - Source Code Example</a></li>
41+
<li><a href="https://www.sourcecodeexamples.net/2023/08/fopen-in-c-source-code-example.html" target="_blank">fopen() in C - Source Code Example</a></li>
42+
<li><a href="https://www.sourcecodeexamples.net/2023/08/fclose-in-c-source-code-example.html" target="_blank">fclose() in C - Source Code Example</a></li>
43+
<li><a href="https://www.sourcecodeexamples.net/2023/08/fwrite-in-c-source-code-example.html" target="_blank">fwrite() in C - Source Code Example</a></li>
44+
<li><a href="https://www.sourcecodeexamples.net/2023/08/fread-in-c-source-code-example.html" target="_blank">fread() in C - Source Code Example</a></li>
45+
<li><a href="https://www.sourcecodeexamples.net/2023/08/fgets-in-c-source-code-example.html" target="_blank">fgets() in C - Source Code Example</a></li>
46+
<li><a href="https://www.sourcecodeexamples.net/2023/08/fputs-in-c-source-code-example.html" target="_blank">fputs() in C - Source Code Example</a></li>
47+
<li><a href="https://www.sourcecodeexamples.net/2023/08/getchar-in-c-source-code-example.html" target="_blank">getchar() in C - Source Code Example</a></li>
48+
<li><a href="https://www.sourcecodeexamples.net/2023/08/putchar-in-c-source-code-example.html" target="_blank">putchar() in C - Source Code Example</a></li>
49+
</ol>
50+
<p></p>
51+
<h1 style="text-align: left;">String Operations Library&nbsp;Functions</h1>
52+
<div>
53+
<ol style="text-align: left;">
54+
<li><a href="https://www.sourcecodeexamples.net/2023/08/strcpy-in-c-source-code-example.html" target="_blank">strcpy() in C - Source Code Example</a></li>
55+
<li><a href="https://www.sourcecodeexamples.net/2023/08/strncpy-in-c-source-code-example.html" target="_blank">strncpy() in C - Source Code Example</a></li>
56+
<li><a href="https://www.sourcecodeexamples.net/2023/08/strncpy-in-c-source-code-example_27.html" target="_blank">strncpy() in C - Source Code Example</a></li>
57+
<li><a href="https://www.sourcecodeexamples.net/2023/08/strcat-in-c-source-code-example.html" target="_blank">strcat() in C - Source Code Example</a></li>
58+
<li><a href="https://www.sourcecodeexamples.net/2023/08/strncat-in-c-source-code-example.html" target="_blank">strncat() in C - Source Code Example</a></li>
59+
<li><a href="https://www.sourcecodeexamples.net/2023/08/strlen-in-c-source-code-example.html" target="_blank">strlen() in C - Source Code Example</a></li>
60+
<li><a href="https://www.sourcecodeexamples.net/2023/08/strcmp-in-c-source-code-example.html" target="_blank">strcmp() in C - Source Code Example</a></li>
61+
<li><a href="https://www.sourcecodeexamples.net/2023/08/strncmp-in-c-source-code-example.html" target="_blank">strncmp() in C - Source Code Example</a></li>
62+
<li><a href="https://www.sourcecodeexamples.net/2023/08/strchr-in-c-source-code-example.html" target="_blank">strchr() in C - Source Code Example</a></li>
63+
<li><a href="https://www.sourcecodeexamples.net/2023/08/strrchr-in-c-source-code-example.html" target="_blank">strrchr() in C - Source Code Example</a></li>
64+
<li><a href="https://www.sourcecodeexamples.net/2023/08/strstr-in-c-source-code-example.html" target="_blank">strstr() in C - Source Code Example</a></li>
65+
<li><a href="https://www.sourcecodeexamples.net/2023/08/strdup-in-c-source-code-example.html" target="_blank">strdup() in C - Source Code Example</a></li>
66+
<li><a href="https://www.sourcecodeexamples.net/2023/08/strcoll-in-c-source-code-example.html" target="_blank">strcoll() in C - Source Code Example</a></li>
67+
</ol>
68+
</div>
69+
<h1 style="text-align: left;">General Utilities Library&nbsp;Functions</h1>
70+
<div>
71+
<ol style="text-align: left;">
72+
<li><a href="https://www.sourcecodeexamples.net/2023/08/malloc-in-c-source-code-example.html" target="_blank">malloc() in C - Source Code Example</a></li>
73+
<li><a href="https://www.sourcecodeexamples.net/2023/08/calloc-in-c-source-code-example.html" target="_blank">calloc() in C - Source Code Example</a></li>
74+
<li><a href="https://www.sourcecodeexamples.net/2023/08/free-in-c-source-code-example.html" target="_blank">free() in C - Source Code Example</a></li>
75+
<li><a href="https://www.sourcecodeexamples.net/2023/08/realloc-in-c-source-code-example.html" target="_blank">realloc() in C - Source Code Example</a></li>
76+
<li><a href="https://www.sourcecodeexamples.net/2023/08/atoi-in-c-source-code-example.html" target="_blank">atoi() in C - Source Code Example</a></li>
77+
<li><a href="https://www.sourcecodeexamples.net/2023/08/atol-in-c-source-code-example.html" target="_blank">atol() in C - Source Code Example</a></li>
78+
<li><a href="https://www.sourcecodeexamples.net/2023/08/atof-in-c-source-code-example.html" target="_blank">atof() in C - Source Code Example</a></li>
79+
<li><a href="https://www.sourcecodeexamples.net/2023/08/rand-in-c-source-code-example.html" target="_blank">rand() in C - Source Code Example</a></li>
80+
<li><a href="https://www.sourcecodeexamples.net/2023/08/system-in-c-source-code-example.html" target="_blank">system() in C - Source Code Example</a></li>
81+
<li><a href="https://www.sourcecodeexamples.net/2023/08/srand-in-c-source-code-example.html" target="_blank">srand() in C - Source Code Example</a></li>
82+
<li><a href="https://www.sourcecodeexamples.net/2023/08/exit-in-c-source-code-example.html" target="_blank">exit() in C - Source Code Example</a></li>
83+
<li><a href="https://www.sourcecodeexamples.net/2023/08/abs-in-c-source-code-example.html" target="_blank">abs() in C - Source Code Example</a></li>
84+
<li><a href="https://www.sourcecodeexamples.net/2023/08/qsort-in-c-source-code-example.html" target="_blank">qsort() in C - Source Code Example</a></li>
85+
<li><a href="https://www.sourcecodeexamples.net/2023/08/div-in-c-source-code-example.html" target="_blank">div() in C - Source Code Example</a></li>
86+
</ol>
87+
</div>
88+
<h1 style="text-align: left;">Mathematical Library&nbsp;Functions</h1>
89+
<div>
90+
<ol style="text-align: left;">
91+
<li><a href="https://www.sourcecodeexamples.net/2023/08/sin-in-c.html" target="_blank">sin() Function Example in C Programming</a></li>
92+
<li><a href="https://www.sourcecodeexamples.net/2023/08/cos-in-c.html#google_vignette" target="_blank">cos() Function Example in C Programming</a></li>
93+
<li><a href="https://www.sourcecodeexamples.net/2023/08/tan-in-c.html" target="_blank">tan() Function Example in C Programming</a></li>
94+
<li><a href="https://www.sourcecodeexamples.net/2023/08/asin-in-c.html" target="_blank">asin() Function Example in C Programming</a></li>
95+
<li><a href="https://www.sourcecodeexamples.net/2023/08/acos-in-c.html" target="_blank">acos() Function Example in C Programming</a></li>
96+
<li><a href="https://www.sourcecodeexamples.net/2023/08/atan-in-c.html" target="_blank">atan() Function Example in C Programming</a></li>
97+
<li><a href="https://www.sourcecodeexamples.net/2023/08/atan2-in-c.html" target="_blank">atan2() Function Example in C Programming</a></li>
98+
<li><a href="https://www.sourcecodeexamples.net/2023/08/sinh-in-c.html" target="_blank">sinh() Function Example in C Programming</a></li>
99+
<li><a href="https://www.sourcecodeexamples.net/2023/08/cosh-in-c.html" target="_blank">cosh() Function Example in C Programming</a></li>
100+
<li><a href="https://www.sourcecodeexamples.net/2023/08/tanh-in-c.html" target="_blank">tanh() Function Example in C Programming</a></li>
101+
<li><a href="https://www.sourcecodeexamples.net/2023/08/exp-in-c.html" target="_blank">exp() Function Example in C Programming</a></li>
102+
<li><a href="https://www.sourcecodeexamples.net/2023/08/log-in-c.html" target="_blank">log() Function Example in C Programming</a></li>
103+
<li><a href="https://www.sourcecodeexamples.net/2023/08/log10-in-c.html" target="_blank">log10() Function Example in C Programming</a></li>
104+
<li><a href="https://www.sourcecodeexamples.net/2023/08/pow-in-c.html" target="_blank">pow() Function Example in C Programming</a></li>
105+
<li><a href="https://www.sourcecodeexamples.net/2023/08/sqrt-in-c.html" target="_blank">sqrt() Function Example in C Programming</a></li>
106+
<li><a href="https://www.sourcecodeexamples.net/2023/08/ceil-in-c.html" target="_blank">ceil() Function Example in C Programming</a></li>
107+
<li><a href="https://www.sourcecodeexamples.net/2023/08/floor-in-c.html" target="_blank">floor() Function Example in C Programming</a></li>
108+
<li><a href="https://www.sourcecodeexamples.net/2023/08/fabs-in-c.html" target="_blank">fabs() Function Example in C Programming</a></li>
109+
</ol>
110+
</div>
111+
<h1 style="text-align: left;">Character Library&nbsp;Functions</h1>
112+
<div>
113+
<ol style="text-align: left;">
114+
<li><a href="https://www.sourcecodeexamples.net/2023/08/isalnum-in-c.html" target="_blank">isalnum() Function Example in C Programming</a></li>
115+
<li><a href="https://www.sourcecodeexamples.net/2023/08/isalpha-in-c.html" target="_blank">isalpha() Function Example in C Programming</a></li>
116+
<li><a href="https://www.sourcecodeexamples.net/2023/08/isblank-in-c.html" target="_blank">isblank() Function Example in C Programming</a></li>
117+
<li><a href="https://www.sourcecodeexamples.net/2023/08/iscntrl-in-c.html" target="_blank">iscntrl() Function Example in C Programming</a></li>
118+
<li><a href="https://www.sourcecodeexamples.net/2023/08/isdigit-in-c.html" target="_blank">isdigit() Function Example in C Programming</a></li>
119+
<li><a href="https://www.sourcecodeexamples.net/2023/08/isgraph-in-c.html" target="_blank">isgraph() Function Example in C Programming</a></li>
120+
<li><a href="https://www.sourcecodeexamples.net/2023/08/islower-in-c.html" target="_blank">islower() Function Example in C Programming</a></li>
121+
<li><a href="https://www.sourcecodeexamples.net/2023/08/isprint-in-c.html" target="_blank">isprint() Function Example in C Programming</a></li>
122+
<li><a href="https://www.sourcecodeexamples.net/2023/08/ispunct-in-c.html" target="_blank">ispunct() Function Example in C Programming</a></li>
123+
<li><a href="https://www.sourcecodeexamples.net/2023/08/isspace-in-c.html" target="_blank">isspace() Function Example in C Programming</a></li>
124+
<li><a href="https://www.sourcecodeexamples.net/2023/08/isupper-in-c.html" target="_blank">isupper() Function Example in C Programming</a></li>
125+
<li><a href="https://www.sourcecodeexamples.net/2023/08/isxdigit-in-c.html" target="_blank">isxdigit() Function Example in C Programming</a></li>
126+
<li><a href="https://www.sourcecodeexamples.net/2023/08/tolower-in-c.html" target="_blank">tolower() Function Example in C Programming</a></li>
127+
<li><a href="https://www.sourcecodeexamples.net/2023/08/toupper-in-c.html" target="_blank">toupper() Function Example in C Programming</a></li>
128+
</ol>
129+
</div>
130+
<h1 style="text-align: left;">Time and Date Library&nbsp;Functions</h1>
131+
<div>
132+
<ol style="text-align: left;">
133+
<li><a href="https://www.sourcecodeexamples.net/2023/08/time-in-c.html" target="_blank">time() Function Example in C Programming</a></li>
134+
<li><a href="https://www.sourcecodeexamples.net/2023/08/ctime-in-c.html" target="_blank">ctime() Function Example in C Programming</a></li>
135+
<li><a href="https://www.sourcecodeexamples.net/2023/08/strftime-in-c.html" target="_blank">strftime() Function Example in C Programming</a></li>
136+
<li><a href="https://www.sourcecodeexamples.net/2023/08/mktime-in-c.html" target="_blank">mktime() Function Example in C Programming</a></li>
137+
<li><a href="https://www.sourcecodeexamples.net/2023/08/difftime-in-c.html" target="_blank">difftime() Function Example in C Programming</a></li>
138+
<li><a href="https://www.sourcecodeexamples.net/2023/08/clock-in-c.html" target="_blank">clock() Function Example in C Programming</a></li>
139+
<li><a href="https://www.sourcecodeexamples.net/2023/08/localtime-in-c.html" target="_blank">localtime() Function Example in C Programming</a></li>
140+
<li><a href="https://www.sourcecodeexamples.net/2023/08/gmtime-in-c.html" target="_blank">gmtime() Function Example in C Programming</a></li>
141+
<li><a href="https://www.sourcecodeexamples.net/2023/08/asctime-in-c.html#google_vignette" target="_blank">asctime() Function Example in C Programming</a></li>
142+
</ol>
143+
</div>
144+
<h1 style="text-align: left;">Signal Handling Library&nbsp;Functions</h1>
145+
<div>
146+
<ol style="text-align: left;">
147+
<li><a href="https://www.sourcecodeexamples.net/2023/08/signal-in-c.html" target="_blank">signal() Function Example in C Programming</a></li>
148+
<li><a href="https://www.sourcecodeexamples.net/2023/08/raise-in-c.html" target="_blank">raise() Function Example in C Programming</a></li>
149+
</ol>
150+
</div>
151+
<h1 style="text-align: left;">Non-local Jumps Library Functions</h1>
152+
<div>
153+
<ol style="text-align: left;">
154+
<li><a href="https://www.sourcecodeexamples.net/2023/08/longjmp-in-c.html" target="_blank">longjmp() Function Example in C Programming</a></li>
155+
<li><a href="https://www.sourcecodeexamples.net/2023/08/setjmp-in-c.html" target="_blank">setjmp() Function Example in C Programming</a></li>
156+
</ol>
157+
</div>
158+
<h1 style="text-align: left;">Assertion Library&nbsp;Functions</h1>
159+
<div>
160+
<ol style="text-align: left;">
161+
<li><a href="https://www.sourcecodeexamples.net/2023/08/assert-in-c.html" target="_blank">assert() Function Example in C Programming</a></li>
162+
</ol>
163+
</div>
164+
</div>
165+
</div>
166+
</div>
167+
</div>

0 commit comments

Comments
 (0)