Loading content...
Loading content...
<div style="max-width:900px;margin:30px auto;font-family:Arial,Helvetica,sans-serif;color:#333;line-height:1.8;">
<h2 style="font-size:34px;color:#5B21B6;margin-bottom:15px;font-weight:700;">
C Language Introduction
</h2>
<p style="font-size:17px;margin-bottom:20px;">
C is a general-purpose procedural programming language. It is known for its high performance, efficiency, and low-level memory access. Due to its speed, portability, and close interaction with hardware, C is widely used in system programming, embedded systems, and performance-critical applications.
</p>
<h2 style="font-size:30px;color:#5B21B6;margin:35px 0 20px;font-weight:700;">
First C Program
</h2>
<div style="background:#1E293B;color:#F8FAFC;border-radius:10px;overflow:hidden;box-shadow:0 4px 12px rgba(0,0,0,.15);margin-bottom:20px;">
<div style="background:#0F172A;padding:12px 18px;font-size:15px;font-weight:bold;border-bottom:1px solid #334155;">
C
</div>
<pre style="margin:0;padding:20px;font-size:15px;overflow:auto;"><code>#include <stdio.h>
int main(){
printf("Hello World");
return 0;
}</code></pre>
</div>
<h3 style="font-size:24px;color:#111827;margin-bottom:15px;">
Output
</h3>
<div style="background:#F8FAFC;border-left:5px solid #5B21B6;padding:18px;border-radius:8px;margin-bottom:35px;">
<pre style="margin:0;font-size:16px;"><code>Hello World</code></pre>
</div>
<h2 style="font-size:30px;color:#5B21B6;margin-bottom:25px;">
Structure of a C Program
</h2>
<h3 style="font-size:24px;color:#111827;margin-bottom:15px;">
1. Header File Inclusion
</h3>
<div style="background:#1E293B;color:#F8FAFC;border-radius:10px;overflow:hidden;box-shadow:0 4px 12px rgba(0,0,0,.15);margin-bottom:20px;">
<div style="background:#0F172A;padding:12px 18px;font-size:15px;font-weight:bold;border-bottom:1px solid #334155;">
C
</div>
<pre style="margin:0;padding:20px;font-size:15px;"><code>#include <stdio.h></code></pre>
</div>
<p style="font-size:17px;margin-bottom:25px;">
Header files contain function declarations and macro definitions that can be used in a program. The <strong>#include</strong> directive tells the preprocessor to include the contents of the specified header file before compilation.
</p>
<h3 style="font-size:24px;color:#111827;margin-bottom:18px;">
Common Header Files
</h3>
<table style="width:100%;border-collapse:collapse;border:1px solid #ddd;margin-bottom:40px;">
<thead>
<tr style="background:#5B21B6;color:#fff;">
<th style="padding:14px;border:1px solid #ddd;text-align:left;">Header File</th>
<th style="padding:14px;border:1px solid #ddd;text-align:left;">Purpose</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding:14px;border:1px solid #ddd;"><strong>stdio.h</strong></td>
<td style="padding:14px;border:1px solid #ddd;">Input and output functions</td>
</tr>
<tr style="background:#F9FAFB;">
<td style="padding:14px;border:1px solid #ddd;"><strong>stdlib.h</strong></td>
<td style="padding:14px;border:1px solid #ddd;">Memory management and utility functions</td>
</tr>
<tr>
<td style="padding:14px;border:1px solid #ddd;"><strong>string.h</strong></td>
<td style="padding:14px;border:1px solid #ddd;">String handling functions</td>
</tr>
<tr style="background:#F9FAFB;">
<td style="padding:14px;border:1px solid #ddd;"><strong>math.h</strong></td>
<td style="padding:14px;border:1px solid #ddd;">Mathematical functions</td>
</tr>
<tr>
<td style="padding:14px;border:1px solid #ddd;"><strong>stdint.h</strong></td>
<td style="padding:14px;border:1px solid #ddd;">Fixed-size integer data types</td>
</tr>
<tr style="background:#F9FAFB;">
<td style="padding:14px;border:1px solid #ddd;"><strong>stddef.h</strong></td>
<td style="padding:14px;border:1px solid #ddd;">Standard type definitions and macros</td>
</tr>
</tbody>
</table>
<h3 style="font-size:24px;color:#111827;margin-bottom:15px;">
2. Main Function
</h3>
<div style="background:#1E293B;color:#F8FAFC;border-radius:10px;overflow:hidden;box-shadow:0 4px 12px rgba(0,0,0,.15);margin-bottom:20px;">
<div style="background:#0F172A;padding:12px 18px;font-size:15px;font-weight:bold;border-bottom:1px solid #334155;">
C
</div>
<pre style="margin:0;padding:20px;font-size:15px;"><code>int main()</code></pre>
</div>
<p style="font-size:17px;margin-bottom:20px;">
The <strong>main()</strong> function is the starting point of every C program. Program execution begins from this function.
</p>
<ul style="padding-left:22px;font-size:17px;line-height:2;">
<li><strong>int</strong> specifies the return type of the function.</li>
<li><strong>main()</strong> is the function name.</li>
<li>Empty parentheses indicate that no arguments are passed.</li>
</ul>
<h3 style="font-size:24px;color:#111827;margin-top:35px;">
3. Function Body
</h3>
</div>