Tutorials
References
Exercises
Videos
Menu
Log in
Create Website
Get Certified
Upgrade
HTML
CSS
JAVASCRIPT
SQL
PYTHON
JAVA
PHP
BOOTSTRAP
HOW TO
W3.CSS
C
C++
C#
REACT
R
JQUERY
DJANGO
TYPESCRIPT
NODEJS
MYSQL
Dark mode
Dark code
×
Tutorials
HTML and CSS
Learn HTML
Learn CSS
Learn RWD
Learn Bootstrap
Learn W3.CSS
Learn Colors
Learn Icons
Learn Graphics
Learn SVG
Learn Canvas
Learn How To
Learn Sass
Data Analytics
Learn AI
Learn Machine Learning
Learn Data Science
Learn NumPy
Learn Pandas
Learn SciPy
Learn Matplotlib
Learn Statistics
Learn Excel
XML Tutorials
Learn XML
Learn XML AJAX
Learn XML DOM
Learn XML DTD
Learn XML Schema
Learn XSLT
Learn XPath
Learn XQuery
JavaScript
Learn JavaScript
Learn jQuery
Learn React
Learn AngularJS
Learn JSON
Learn AJAX
Learn AppML
Learn W3.JS
Programming
Learn Python
Learn Java
Learn C
Learn C++
Learn C#
Learn R
Learn Kotlin
Learn Go
Learn Django
Learn TypeScript
Server Side
Learn SQL
Learn MySQL
Learn PHP
Learn ASP
Learn Node.js
Learn Raspberry Pi
Learn Git
Learn MongoDB
Learn AWS Cloud
Web Building
Create a Website
NEW
Where To Start
Web Templates
Web Statistics
Web Certificates
Web Development
Code Editor
Test Your Typing Speed
Play a Code Game
Cyber Security
Accessibility
Join our Newsletter
Data Analytics
Learn AI
Learn Machine Learning
Learn Data Science
Learn NumPy
Learn Pandas
Learn SciPy
Learn Matplotlib
Learn Statistics
Learn Excel
Learn Google Sheets
XML Tutorials
Learn XML
Learn XML AJAX
Learn XML DOM
Learn XML DTD
Learn XML Schema
Learn XSLT
Learn XPath
Learn XQuery
×
References
HTML
HTML Tag Reference
HTML Browser Support
HTML Event Reference
HTML Color Reference
HTML Attribute Reference
HTML Canvas Reference
HTML SVG Reference
Google Maps Reference
CSS
CSS Reference
CSS Browser Support
CSS Selector Reference
Bootstrap 3 Reference
Bootstrap 4 Reference
W3.CSS Reference
Icon Reference
Sass Reference
JavaScript
JavaScript Reference
HTML DOM Reference
jQuery Reference
AngularJS Reference
AppML Reference
W3.JS Reference
Programming
Python Reference
Java Reference
Server Side
SQL Reference
MySQL Reference
PHP Reference
ASP Reference
XML
XML DOM Reference
XML Http Reference
XSLT Reference
XML Schema Reference
Character Sets
HTML Character Sets
HTML ASCII
HTML ANSI
HTML Windows-1252
HTML ISO-8859-1
HTML Symbols
HTML UTF-8
×
Exercises and Quizzes
Exercises
HTML Exercises
CSS Exercises
JavaScript Exercises
Python Exercises
SQL Exercises
PHP Exercises
Java Exercises
C Exercises
C++ Exercises
C# Exercises
jQuery Exercises
React.js Exercises
MySQL Exercises
Bootstrap 5 Exercises
Bootstrap 4 Exercises
Bootstrap 3 Exercises
NumPy Exercises
Pandas Exercises
SciPy Exercises
TypeScript Exercises
Excel Exercises
R Exercises
Git Exercises
Kotlin Exercises
Go Exercises
MongoDB Exercises
Quizzes
HTML Quiz
CSS Quiz
JavaScript Quiz
Python Quiz
SQL Quiz
PHP Quiz
Java Quiz
C Quiz
C++ Quiz
C# Quiz
jQuery Quiz
React.js Quiz
MySQL Quiz
Bootstrap 5 Quiz
Bootstrap 4 Quiz
Bootstrap 3 Quiz
NumPy Quiz
Pandas Quiz
SciPy Quiz
TypeScript Quiz
XML Quiz
R Quiz
Git Quiz
Kotlin Quiz
Cyber Security Quiz
Accessibility Quiz
Courses
HTML Course
CSS Course
JavaScript Course
Front End Course
Python Course
SQL Course
PHP Course
Java Course
C++ Course
C# Course
jQuery Course
React.js Course
Bootstrap 4 Course
Bootstrap 3 Course
NumPy Course
Pandas Course
TypeScript Course
XML Course
R Course
Data Analytics Course
Cyber Security Course
Accessibility Course
Certificates
HTML Certificate
CSS Certificate
JavaScript Certificate
Front End Certificate
Python Certificate
SQL Certificate
PHP Certificate
Java Certificate
C++ Certificate
C# Certificate
jQuery Certificate
React.js Certificate
MySQL Certificate
Bootstrap 5 Certificate
Bootstrap 4 Certificate
Bootstrap 3 Certificate
TypeScript Certificate
XML Certificate
Excel Certificate
Data Science Certificate
Cyber Security Certificate
Accessibility Certificate
×
Tutorials
References
Exercises
Get Certified
Upgrade
Spaces
Videos
Shop
C
Tutorial
C HOME
C Intro
C Get Started
C Syntax
C Output
Print Text
New Lines
C Comments
C Variables
C Data Types
Data Types
Type Conversion
C Constants
C Operators
C Booleans
C If...Else
C If...Else
C Short Hand If
C Switch
C While Loop
C For Loop
C Break/Continue
C Arrays
Arrays
Multidimensional Arrays
C Strings
Strings
Special Characters
String Functions
C User Input
C Memory Address
C Pointers
C
Functions
C Functions
C Function Parameters
C Function Declaration
C Recursion
C Math Functions
C
Structures
C Structures
C
Examples
C Examples
C Exercises
C Quiz
C Compiler
C
Examples
❮ Previous
Next ❯
Syntax
Create a simple "Hello World" program
Syntax Explained
Output/Print
Use printf to print text
Using many printf functions
Insert a new line with \n
Output Explained
Comments
Single-line comment before a line of code
Single-line comment at the end of a line of code
Multi-line comment
Comments Explained
Variables
Create an integer variable and print it
Add a variable to another variable
Declare many variables of the same type with a comma-separated list
Constant (unchangeable) variable
Variables Explained
Data Types and Format Specifiers
A demonstration of different data types and format specifiers
Data Types and Format Specifiers Explained
Operators
Addition operator
Subtraction operator
Division operator
Modulus operator
Increment operator
Decrement operator
Assignment operator
Addition assignment operator
Comparison operator
Logical operators
Operators Explained
If...Else (Conditions)
The if statement
The else statement
The else if statement
If...Else Explained
Switch
The switch statement
The switch statement with a default keyword
Switch Explained
Loops
While loop
Do while loop
For loop
Break a loop
Continue a loop
Loops Explained
Arrays
Create and access an array
Change an array element
Loop through an array
Arrays Explained
Strings
Create a string
Another way to create a string
Access string characters
Change string characters
Strings Explained
User Input
Input a number and print the result
Input two numbers and print the sum
User Input Explained
Memory Address/References
Get the memory address of a variable
Memory Address Explained
Pointers
Create a pointer variable
Get the value of a variable with the dereference operator *
Pointers Explained
Functions
Create and call a function
Call a function multiple times
Function declaration and definition
Parameters and arguments
Multiple parameters
Return value
Return the sum of two parameters
Recursion (make a function call itself)
Use a math function to get the square root of a number
Functions Explained
Structures
Access a structure
Create multiple structure variables with different values
String in structure
Simpler Syntax (shorthand)
Copy structure values
Modify values
Real Life Example
Structures Explained
❮ Previous
Next ❯
COLOR PICKER
Get certified
by completing
a
course today!
w
3
s
c
h
o
o
l
s
C
E
R
T
I
F
I
E
D
.
2
0
2
2
Get started