Introduction
What is Programming?
Computer programming is a medium for us to communicate with computers, just like we use Hindi or English to communicate with each other. Programming is a way for us to deliver our instructions to the computer.
What is C?
C is a programming language. C is one of the oldest and finest programming languages. C was developed by Dennis Ritchie in 1972.
Uses of C
C is a language that is used to program a wide variety of systems. Some of the uses of C are as follows:
Major parts of Windows, Linux, and other operating systems are written in C.
C is used to write driver programs for devices like Tablets, Printers, etc.
C language is used to program embedded systems where programs need to run faster in limited memory.
C is used to develop games, an area where latency is very important, i.e., a computer has to react quickly to user input.
DGCC, Department of Information Technology
Variables, Constants, and Keywords
DGCC, Department of Information Technology
Constants
DGCC, Department of Information Technology
Keywords
These are reserved words whose meaning is already known to the compiler. There are 32 keywords available in c:
auto double int struct
break long else switch
case return enum typedef
char register extern union
const short float unsigned
continue signed for void
default sizeof goto volatile
do static if while
DGCC, Department of Information Technology
First C program�
#include<stdio.h>
int main() {
printf(“Hello, I am learning C with Mr. Modi”);
return 0;
}
The basic structure of a C program
Comments
Single line comment: //This is a comment.
Multi-line comment : /*This is multi-line comment*/
DGCC, Department of Information Technology
Compilation and execution�
Library functions
DGCC, Department of Information Technology
Types of variables�
DGCC, Department of Information Technology
Questions
DGCC, Department of Information Technology
Instructions and Operators:�
DGCC, Department of Information Technology
DGCC, Department of Information Technology
Conditional Instructions�
DGCC, Department of Information Technology
Relational Operators in C�
DGCC, Department of Information Technology
Operator Precedence�
DGCC, Department of Information Technology
Practice Set - if - else
DGCC, Department of Information Technology
Loop Control Instruction
DGCC, Department of Information Technology
Increment and decrement operators�
DGCC, Department of Information Technology
Do-while loop:�
DGCC, Department of Information Technology
For Loop�
DGCC, Department of Information Technology
A case of Decrementing for loop�
DGCC, Department of Information Technology
The Break Statement in C�
DGCC, Department of Information Technology
The continue statement in c�
DGCC, Department of Information Technology
Practice Set -do -while
DGCC, Department of Information Technology
Number Guessing Game�
DGCC, Department of Information Technology
Functions and Recursions
DGCC, Department of Information Technology
Important Points:�
DGCC, Department of Information Technology
Thank You
DGCC, Department of Information Technology