5. C programming
What is C?
C is a programming language developed at AT &
Bell laboratories of USA in 1972 by Dennis Ritchie.
Structured programming language.
machine-independent and extensively used to
write various applications, Operating Systems etc... This Photo by Unknown author is licensed under CC BY-NC-ND.
7. Constants, Variables and Keyword
• A constant is an entity that doesn't change
• Integer constant
• Real constant
• A variable is an entity that may change.
• A key word is a word that carries special meaning. There are only 32 keyword available
8. q C instructions
Type Declaration Instructions. These instructions inform the compiler about the type of variables used.
q Type of instruction
The if – else statement
Use if and else to implement the decision control instruction.
• Syntex:
if (condition)
//statement
else
//statement.
9. The ! Operation
• Operators are used to perform operations on variables and values.
• There are various operators :
• Arithmetic operators – These are like +, - , * , / , % etc.
• Assignment operators – The "=" sign is used to assign the values in the variables
• Comparison operators – These are like == , != , >= , <= etc.
• Logical operators – And(&&) , Or(||) and Not(!) are called as logical operator
Hierarchy of operations revisited
The conditional operation.
program & exercises
10. The while loop:
• While loop
A while loop repeatedly executes a target statement if a given condition is true.
• Syntax of while loop:
while (testExpression) {
// the body of the loop
}
Tips and traps
More operators
program & exercises
11. For loop
• The for loop is used to iterate the statements or a part of the program several times.
• Syntax of for loop
for(Expression 1; Expression 2; Expression 3){
//code to be executed
}
Nesting loop
Multiple initialization in the for loop
The break statement
The continue statement
12. q The do- while loop
The do-while loop is similar to the while loop with one important difference. The body of do-while loop is executed at least
once.do-while loop
do {
// the body of the loop
}
while (testExpression);
q program & exercises
13. • Case control instruction
• Decision using switch
• Tips and Traps
• Switch v/s if – else ladder
• Go to key word.
• practice & exercises
14. Function
• What is function?
• A function is a self-contained block of statements that performs a coherent task of some kind
• why use function?
• Writing functions avoid writing the same code over and over.
• If the operation of a program, can we divide it into separate activities and each activity placed in a
different function then it could be written and checked more or less independently
passing value between function
order of passing arguments
using library function.
return type of function
15. Pointer
Introduction
• The pointer in C language is a variable which stores the address of another variable.
• A pointer variable points to a data type of the same type and created with the * operator.
function called using pointer
practice and exercise
16. Introduction of linux
Understanding linux OS
Why linux
Installation of VMware
Installation of IDE
Basic commands
Native compiler
Cross compiler
18. Being human: An AI based
android application for im
proving, easing and enhan
cing our lifestyle
• This application is like your
virtual personal manager,
enhancing your lifestyle with
a touch of artificial
intelligence.
• The features of the
application makes it a unique
application as summing up
the features it’s like an all-in-
one application having
features of
more than ten different applic
ations.