SoftDot Hi –Tech Educational & Training Institute
(A unit of De Unique Educational Society)
UNIT -1
PROGRAMMING IN C
Programming
To solve a computing problem, its solution must be specified in terms of sequence of computational steps such that they are effectively solved by a human agent or by a digital computer.
Programming Language
The specification of the sequence of computational steps in a particular programming language is termed as a program
The task of developing programs is called programming
The person engaged in programming activity is called programmer
Techniques of Problem Solving
Problem solving an art in that it requires enormous intuitive power & a science for it takes a pragmatic approach.
Here a rough outline of a general problem solving approach.
Write out the problem statement include information on what you are to solve & consider why you need to solve the problem
Make sure you are solving the real problem as opposed to the perceived problem. To check to see that you define & solve the real problem
Draw & label a sketch. Define & name all variables and /or symbols. Show numerical values of variables, if known.
Identify & Name
relevant principles, theories & equations
system & subsystems
dependent & independent variables
known & unknowns
inputs & outputs
necessary information
List assumptions and approximations involved in solving the problem. Question the assumptions and then state which ones are the most reasonable for your purposes.
Check to see if the problem is either under-specified, figure out how to find the missing information. If over-specified, identify the extra information that is not needed.
Relate problem to similar problem or experience
Use an algorithm
Evaluate and examine and evaluate the answer to see it makes sense.
Introduction to C Programming
C is a general-purpose computer programming language developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system. C is a structured programming language, which means that it allows you to develop programs using well-defined control structures (you will learn about control structures in the articles to come), and provides modularity (breaking the task into multiple sub tasks that are simple enough to understand and to reuse). C is often called a middle-level language because it combines the best elements of low-level or machine language with high-level languages.
Where is C useful?
C’s ability to communicate directly with hardware makes it a powerful choice for system programmers. In fact, popular operating systems such as Unix and Linux are written entirely in C. Additionally, even compilers and interpreters for other languages such as FORTRAN, Pascal, and BASIC are written in C. However, C’s scope is not just limited to developing system programs. It is also used to develop any kind of application, including complex business ones. The following is a partial list of areas where C language is used:
Ø Embedded Systems
Ø Systems Programming
Ø Artificial Intelligence
Ø Industrial Automation
Ø Computer Graphics
Ø Space Research
Share with your friends: |