Download presentation
Presentation is loading. Please wait.
1
Be A programmer in 1 2 3 Steps
Learn C in 3 Steps Be A programmer in Steps Abhilash Badami
2
Steps Step 1 : Know the History of C Language
Step 2 : Why only C Language Step 3 : Simple Problems Solving and Fun with Maths
3
History of C language Many of the important ideas of C stem from the language BCPL, developed by Martin Richards. The influence of BCPL on C proceeded indirectly through the language B, which was written by Ken Thompson in 1970. In 1972 Dennis Ritchie at Bell Labs writes C and in 1978 the publication of The C Programming Language by Kernighan & Ritchie caused a revolution in the computing world.
4
Know more about C C language is a case sensitive language.
C language is an user defined language with large instruction sets. C language uses compiler for convertion of code. C language is a syntax oriented language.
5
Why only C Language To learn the programming in c First you should know about the logic of it. What is Logic then ? Logic is the problem solving Method which the programmer will use before Writing the Program.
6
There are two types of problem solving Methods
1. Flowchart 2. Algorithm What is Flowchart then ? Diagrammatic representation of the given problem Statement. What is Algorithm ? It is the Step by step representation of the given problem Statement. Can we Solve a Problem With the Help of Flowchart and Algorithm ? What is your answer ?
7
But in Math's We solve problems using Numbers
But in Math's We solve problems using Numbers ? Why flowchart and algorithm in “C” Flowchart and algorithm are the two simple methods which will help the programmer to program the problem statement in C. C language helps only to solve Mathematical Problems ? No it also helps in solving the logical as well as ratios and many more.
8
Let us know more about Flowcharts
As we said flowcharts are the diagrammatic representations. Does it include circles , squares and rectangles? Ans : Yes Let us know which shape will do what action
9
= This shape indicates the Beginning and end of Flowchart ie: Start and End.
= This shape indicates the continuity of the flow chart. = This shape indicates the decision making statements. = This shape indicates the steps. = This indicates the action = Connecting Lines
10
Do you know about this symbols ..?
* Asterix - Used for multiplication operation / division slash – used for division operation Can you identify this symbols ‘ + ‘ ‘ - ’ % Modules – used for division with reminder options
11
Let us solve a simple problem using Maths logic
Add two numbers Sol :- let a=5 and b=11 sum= a+b sum= 5+11 sum= 16
12
Now we will solve the same problem using Flowchart
This Indicates the beginning of Flow Chart Start Where as both shapes indicates some action that is Input to PC Input A=5 Input B=11 Arithmetic and logic operations are performed here Sum = A+B Print Sum As we saw above this indicates action that is output Indicates End of Flow Chart END
13
Which is easy method of solving a problem ?
Yes C language is Easier than Math's Correct….!! Ok , can we work on some other questions like this Are you ready …???
14
Find the solutions for this questions
Draw a flow chart for subtraction Draw a flow chart for division Draw a flow chart for multiplication Draw a flow chart for finding square of a number Draw a flow chart for finding cube of a number
15
Flow chart for subtraction
Start Input A=10 Input B=05 Sub = A - B Print Sub END
16
Flow Chart for Division
Start Input A=10 Input B=05 div= A/B Print Div END
17
Flow Chart for Multiplication
Start Input A=3 Input B=5 mul= A*B Print Sum END
18
Flow chart for finding square of number
Start Input A=5 Square = A*A Print squ END
19
Flow Chart For finding Cube of number
Start Input A=5 Cube= A*A*A Print Cube END
20
Yes I know you are thinking about Logical Problems right….!!
For solving Logical Problems we need to know about IF and ELSE statements. Yes IF and ELSE statement are nothing like true or false statements IF refers to : IF statement 1 is true print statement 1 ELSE print statement 2
21
Confused …!! Let me Explain
Assume two values as A=5 and B=6 now we have to find biggest number between A and B If A>B print A is Big Number Else Print B is Big Number
22
Let us put the same problem in flow chart
This Indicates the beginning of Flow Chart Start Where as both shapes indicates action that is Input to PC Input A=05 This Indicates Decision making of the input problem Input B=06 If A is greater it prints A is big If A>B Else Print A is big Print B is big If B is greater it prints B is big True False What does this Indicate ? END
23
Still Confused … !! Ok let me explain with different example Start
Input A=10 Input B=03 If A>B Else Print A Print B True False END
24
Is there a way such that we need not to use IF and Else Statements …??
Yes we have some special instructions or operations such that if and else statements can be avoided. If we have such instructions then why do we need IF and ELSE statements. Because to Solve complex programs we need the help of IF and ELSE statements.
25
Take a look at this Flow Chart
Logic of this Flow Chart Both inputs A and B are taken first Use the special operation (A>B)? This operation has an in built commend of IF and ELSE statement. It compares first a>b or not If it is greater then it prints A is big Else it goes to next step where it prints B is Big Start Input A=05 Input B=06 Big = (A>B)? Print A is big Print B is Big END
26
Now you have to tell me answer for this
Start What is your Answer What does the computer print ..? Input A=10 Input B=06 Big = (A>B)? Print A is big Print B is Big END
27
END OF SESSION 1 Find Interesting topics in up coming sessions
Know about while loop , for loop , do while loop . Know more about writing algorithms Be a programmer…!!!
28
Future Projects
29
BE A HACKER All About Ethical Hacking Encode Decode Hack….!!!
Abhilash Badami
30
Thank you Q & A
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.