Access over 20 million homework & study documents

Module1 2

Content type
User Generated
Rating
Showing Page:
1/19

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/19

Sign up to view the full document!

lock_open Sign Up
Showing Page:
3/19

Sign up to view the full document!

lock_open Sign Up
End of Preview - Want to read all 19 pages?
Access Now
Unformatted Attachment Preview
Programming in C (PIC13/23) Module – 1 10 Hours Introduction to C Language: Algorithm and flowchart solving of a problem, Programming language, types of programming languages, structure of C program, character set, C token , keywords, identifiers, constant, variable, data types, declaration of variables, ASCII values, operation system , types of operation systems. Algorithm: An algorithm is step by step procedure to solve the given problem An algorithm must satisfy the following requirements: 1. Input --- usually required 2. Output 3. Unambiguousness --- computers don't accept ambiguity 4. Correctness --- correctly solve the given problem 5. Finiteness --- termination 6. Efficiency --- recognition of finite computing resources: CPU cycles, memory 1. Algorithm to ADD 2 integers Take value of first number Store it in ‘A’ Take value of Second number Store it in ‘B’ Add A and B Store the added result in C Display the value of C 2. Algorithm to Swap 2 numbers using a third variable Take 2 numbers from user and store it in A and B Let’s take another variable C C=A A=B B=C Now display the values of A and B 3. Algorithm to Swap 2 numbers without using a third variable Take 2 numbers from user and store it in A and B A=A+B B=A-B A=A-B Now display the values of A and B 4. Algorithm for finding factorial of any number 1. Take a number as input from the user. 2. Initialize a variable fact=1 3. Fact=fact*number 4. Number=number-1 5. Repeat steps 3 to 5 till number>0. 6. Pr ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Anonymous
Super useful! Studypool never disappoints.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Similar Documents