Introduction-to-C-Programming
Introduction-to-C-Programming
Programming
Welcome to the world of C programming! In this presentation, we will cover
the basics and give you the tools you need to build your first program.
Data Types and Variables
Booleans
These data types have a value of
either true or false. They're useful in
control statements and loops.
Basic Input and Output
printf() scanf() puts()
This function is used to output This function is used to receive This function writes the string s
data to the screen in C. It's a bit data input during runtime. It waits and a trailing newline to stdout.
like the console.log() function in for input from the user before
JavaScript. continuing with the program.
Control Statements
do-while
if Executes a block of code
Allows a program to take switch repeatedly, but the
different actions depending Executes different sections statements are executed
on whether a given of code depending on the before the condition is
condition is true or false. value of an expression. checked.
1 2 3 4 5 6
They are like subprograms that can These are collections of elements of
be called anywhere in your code. the same datatype, stored in
contiguous memory locations.
Pointers and Memory
Management
1 Pointer Variables
They store the memory address of other variables. This allows you to
indirectly access the value of a particular variable.