The systematic way of
developing any software is called SDLC. It is the stepwise developing process.
While developing the software various steps are evolved, all these steps form
the life cycle of the system. Therefore, known as SDLC.
All
these steps are:
There
are different steps or stages of system development life cycle
1. Problem Definition : -
Problem definition is the most important stage of system or software
development cycle. This is the stage where the development team studies
the present system. System analyst and
other members are involved in this stage.
They
are mainly discussed with the following issues:
-
Information of the present system and
its working
-
Advantages and disadvantages of
present system.
-
Collection the files, documents and
reports of the present system.
-
Workload of the employees with present
system
-
Need assistant.
2. System Analysis : -
Manual system is literally taken apart and examined piece by piece with the
view of information need and other requirement of the management. The responsibility of this stage goes to system
analyst who is involved in
analyzing, designing, implementing and evaluating computer based information
system to support the decision making and operations of an organization. to
keep constant interaction with management, middle level manager , and working
level personnel in order to achieve the logical and accurate perspective of the
system. The aim of this stage is to ensure that all feasible alternatives and
eventually product and to developed suggestions on how the goals may best be
achieved.
3. System Design :
Programming and coding portion includes in this section. The various phases
involved in the system design are:
a
Algorithm : -
b
Flowchart :-
c
Pseudo code :- It is the English
statements of the program where some program related matters are written so
that it becomes easy for the programmer to write the code later on.
d
Decision table: - Whatever the
decision to be made on the program is written on the tabular format is known as
decision table.
e
Decision tree: - Conversion of the
decision table to the decision tree to make program easier.
f
DFD (Data Flow Diagram): - The
pictorial representation of the data flow in the program.
g
Attributes, Entities, Tables and
Database :-
h
ER-Diagram : - All the entities are to
be showed by their relationship to other entities and this diagram is known as
entity relationship diagram.
4. Coding and debugging
In this phase the concept is
converted into the source code. After the coding is completed, it is tested,
verified and debugged according to the programming rules.
Coding Rules :-
There are various coding rules for different programming and it is done while
program writing process.
Documentation:
- one of the most important phase which
after coding phase
- Internal
coding:
it
is prepared in order to understand the program itself by the programmer in the
form of comment or remarks.
- External
coding: made by the programmer to make the user understand how to use the
system.
- Verification: this is the step which
checks whether the program is working properly or not. Whether the desired
output is obtained or not, this has been checked in this step.
- Code reading and review: it is the last
step where the programmer goes through all the coding part and analyzes whether
the code is without errors
5. System development : -
At this stage the final program specification and file design is handed over to
the programmer will then translate the specification in programming language
suitable for the purpose. Executable programs are output of this stage. The
programmer should be able to select language and able to modify the programs.
During this step the programmer translates the program logic design documents into a computer language format.
6. System testing :- In
this phase it is analyzed that the software fulfills the objective of the
development. According to the definition of IEEE it is defined as "the
process of analyzing the software item to detect the difference between
existing and required system." Another developer named Mayers defined the system
testing as "the process of analyzing a program with the intension o
finding out errors."
System
testing methodologies are of two types:
a. Top down approach: Here the testing is
done by the beginning from the main module and shifting towards the lower level
modules. First the main module is tested and then it is broken down into sub
modules, which is again tested and again broken into other sub modules. The
process is repeated until the last module is tested.
b. Bottom up approach: It is just
opposite of top down approach, where the lower level module is tested first and
then shifted towards the upper level. In this model the lower module is tested
and then they are integrated into some common modules and tested again. It is
continued until the main modules has been obtained and tested.
These
both testing can be divided into two parts. They are:
i. White
box testing: also known as "glass
box testing", because the behavioral part or the structural part is
tested here which is visible from the outside. It is used to check that the
required specification has been met by the designed system or not.
ii.. Black box testing: here only the internal coding part is
tested, so also known as "Functional
testing". As we know that the code is written it is first of all
tested by the developer to check whether it does the prescribed job or not. It
is named as black box testing because only the hidden part is tested here.
7. System Conversion :
After new system has been tested, conversion to the new system occurs.
8. System implementation :
The implementation process runs form the point when the system design has been
formally approved and new system is ready to
be used.
The
following are major activities which involves in implementation process:
i)
Change over the new system :
ii)
User training
iii)
File conversion
9. System evaluation :
Once the implementation process is complete and the system is operational, the
analyst must evaluate the new system. The purpose of the evaluation of the
operation system is three-fold.
Firstly,
the efficiency of the system is to be examined to see whether improvements
ca be made.
Second,
the achievements of the system should be compared to the objectives originally
proposed.
Thirdly,
the evaluation provides valuable feedback to the system analyst.
10. Delivery, maintenance and feedback: -This
is the last step in SDLC. After final system is being developed, it is
delivered to the market or installed in the user machines. The user now starts
using the system and during the using period any problem arises, it is reported
to the developer and the maintenance is done. User is the only parties by which
the feedback has been collected and are improved and modified during another
launching time
once
the system becomes operational, management must address the issue of the
security which includes.
Models
Some
of the popular models to design the system development life cycle are as
follows:
i.
Waterfall model : - It is also known as the classical model which
suggests the systematic and sequential approach to software development that
begins at the system level and progresses through analysis, design, coding,
testing and support.
The
activities evolved in the water fall model are:
·
Feasibility analysis
·
Requirement analysis and project
planning
·
System design
·
Detail design
·
Coding and unit testing
·
System and integration testing
ii. Prototype model: This is
used when the developer are unsure about the detailed of the system to
developed. In this case instead of developing the full system the sample or the
part of the system is being developed. After the trial product is completed,
both parties again sit together for discussion and lastly the final product is
finalized. When the prototype is designed it is evaluated by the customer and
used to refine requirements for the software to be developed. The steps
involved in the prototype models are:
·
Requirements analysis
·
Design
·
Coding
·
Testing
iii. Iterative enhancement model: In
this type of software development model the developer themselves provides the
specification. Here no users are evolved, but the programmers itself makes a
concept and launch it in the market. For example: Windows 95 and their grown up
versions.
First version, Second version , Third version and
so on.
iv. Spiral model:
This model is first enhanced by the scientist named "Boehm", it is
the evolutionary software process models that couples the nature of prototyping
with the controlled and systematic aspects of the water fall model. It contains
six regions:
Customer communication:
tasks required to establish effective communication between developer and
customer.
Planning:
tasks required defining resources, timelines and other project related
information
Risk analysis:
tasks required to access both technical and management risks.
Engineering:
tasks required to build one or more representations of the application.
Construction and release:
tasks required to construct, test, install and provide user support, e.g.
documentation and training.
Customer evaluation:
tasks required to obtain customer feedback based on evaluation of the software
representations created during the engineering stage and implemented during
installation stage.
Chapter 4 - Computer and Society
Computer are used in different
sectors like banks, airlines, hospitals, colleges and universities, military,
scientific research, entertainment, etc. where it provides better services
because of computers. So, it is the source, a versatile machine fit to do the
job at any place, any time. Thus, it has a great impact on our society. There
are some of the positive and negative
impacts of computer in our society.
Positive
Impact
1.
Impact on Employment
ü One
can get new jobs like programming, system analyst, database administrator,
software engineers, hardware engineers, graphics designers. etc
ü Jobs
in computer Manufacture and related companies.
2.
Impact on Production
ü Automated
production is made accurate using technology like computers
ü Used
for assembling the hardware for example in car manufacturing companies
ü Robotics
makes production automatic and easier.
3.
Information Sharing
ü Information
between two persons or two different organization can be shared via the
computers i.e. internet
ü Data
and information can be accessed globally.
ü Email,
chat, video conferencing, etc. mechanism are used for sharing information.
ü Electronic
ads, billboards, bulletins and forums are placed in web to share information.
4.
Impact on Education
ü Computers
are studied as a major subjects in universities and colleges
ü Used
as a teaching tools in science, health, etc.
ü Used
as a learning tools in practical class of school, colleges and universities.
ü Online
study is also available.
ü Distant
learning, using video conferencing, etc.
5.
Impact on Business
ü E-Commerce
i.e. an electronic business is rising
ü Online
banking, effective shopping mall etc. have emerged
ü Online
book store, online gifts centers etc. are facilitating the consumers.
ü Business
is being global now a day
6.
Impact on Entertainment
ü Computers
are used in video editing, special effects, animations, cartoon character
movies, etc.
ü They
are used in music industry for composing, synthesizing, editing the music.
ü Development
of CDs and DVDs for better picture and sound quality.
7.
Impact on Health Sector
ü Computer
controlled devices line CT-SCAN, ultra sound machine; MRI scan machine, etc.
are used
ü Used
for keeping records of patients.
ü Used
for research and development
ü Expert
system line MYCIN is used in hospitals
8.
Impact on Banking Sectors
ü Computers
are used in keeping information of computer's transactions, debit/credit,
balance sheet, etc.
ü Now-a-days
electronic transaction is possible in banks
ü ATM
cards, debit/credit cards, etc. are used.
ü Manual
records are replaced by banking software.
9.
Impact on communication sectors.
ü Computers
are used on communication fields like televisions, radio, FM stations, telecom,
etc.
ü Used
for collecting news and information.
ü Telex,
emails, video conference, video phone, e-fax, etc.
Negative
Impacts
1.
Software Piracy
ü Computers
are used to copy the licensed software without the permission of owner.
ü Internet
is one of the sources of piracy where illegal copying of the programs is done.
2.
Spreading Computer Viruses
ü Computer
viruses i.e. a parasitic program that infects another program may be spread
through e-mails, floppy disks, computer to computer, etc.
ü They
can be used to damage important files,
slowdown the speed of computers, crash the system, etc.
ü e.g.
: Trojan horse, boot sector virus, cluster virus, worms, bombs, stealth virus,
macro virus, joke program etc.
3.
Theft
ü Computer
are used to steal the data from companies, government agencies which are used
for some special purpose.
ü Usually,
hackers steals the secure data by invading the computer's password. Money is
also transferred from on account to another.
4.
Pornography
ü Internet
pornography is growing everywhere.
ü Computers
are used to view the adult websites thus making people offensive and sexual in
their manners.
5.
Plagiarism
ü Computers
are used to copy the other persons work, arts, notes, ideas, etc fro own
purpose.
ü Copying
materials from others articles, books and pasting into ones needed place/
locations of article, books etc.
6.
Hacking
ü Hackers
i.e. an expert programmers, intentionally gains the unauthorized access to
other's computers.
ü They
invade the information system and destroy files and programs.
ü They
may send malicious programs.
7.
Harassment
ü Computers
are used for irritating other people by sending insulting comments, focusing on
gender and racism, making vulgar cartoons of others, treating people on basic
of religion and nationality.
8.
Unemployment
ü Computers,
somewhere is the cause of unemployment.
ü Vacancies
on newspaper at least recommend a computer literate.
ü Computer
technology replace the manual record keepers.
Ethics
and Ethical Issues in Computing
ü Do
not use a computer to harm other people. Do not interface with other people's
computer work. Donot snoop around in other peoples computer files.
ü Do
not use a computer to steal other's information.
ü Do
not use a computer to bear false witness.
ü Do
not copy or use properietary software for which you have not paid.
ü Do
not use other people's computer resources without authorization or proper
compensation.
ü Always
think about the social consequences for the program you are writing or the system
you are designing.
ü Always
use a computer in ways theat esure consideration and respect for your fellow
humans.
Ethical Standards.
A number of definitive sets of
ethics have been developed to restrict the professionals in making harsh
decisions and redirect them towards the right behavioral approach. Sofme of
them include:
ü Association
for computing Machineryu (CAM) codes of ethics is a four point standard that
vogoverns the ethical behavior among the computer professionals.
ü Uniform
computer information transaction Act (UCITA) defines a set of standards related
to the legal and ethical behavior during the computer contract process.
Cyber
Laws
Cyber law is a new grouping
phenomenon that includes the wide variety of political, social and legal issues
related to the internet and www. As internet is growing rapidly in the
cyberspace, cyber law is becoming the preferred environment of the word. Cyber
law encompasses a wide variety of political and legal issues related to the
Internet and other communications technology, including intellectual property,
privacy, freedom of expression, and jurisdiction. Cyber law and computer ethics
and used t control the growing computer crime in the cyberspace. Some of the
laws related to cyber are:
1.
Intellectual property law : - It presents a set of exclusive
rights in relation to the manner in which specific idea or information is
expressed . It denotes the definite legal rights that the authors, investors and other Intellectual
Property holders may hold an expertise. These
laws are designed to protect various forms of intangible subject matters
like: -
Copyright Exists in many computer related
creative works like software, source code discovery etc.
Patent
Right exists in
software and hardware task that lets the inventor to exploit the invention
right for certain period of time.
Trademark
is
a distinctive sign that distinguishes
the products and software of one business from that of another.
Industrial
design rights
protects the appearance of one business from that of another
A
trade secret
is confidential information related to the work procedure of the organization.
Computer
Crime Law
As the vast use of computers in
business , education and personal use is expanding almost like nothing else,
similar is the case in computer crimes and cyber faults. Computer crime is
growing fast because the evolution of technology is fast, but the evolution of
law is slow. While only limited number of nations has passed laws related to
computer crime, the situation is an international problem that requires a long
term solution. Protection measures such as hardware identification, access
control software, disconnecting critical bank applications etc should be
developed. However, compute4rs don't commit crimes; people do, proper ethical and
moral standards should be acted out to reduce the probabilities of fraud.
Digital
Signature
A digital signature is an
electronic signature that is used to authenticate the identity of the sender of
a message or the signer of a document, to ensure that the original content of
the message or document is unchanged. It is a security system which consists of
two. Keys: Private key and public key.
Personal
Privacy Law
Privacy is the ability of an
individual or group to stop information about themselves from becoming known to
people other that those whom they choose to give the information. Sometimes it
may be voluntarily sacrificed, normally in exchange for perceived benefits,
very often with specify dangers and losses.
Cyber
Law 2061 BS-Nepal
Nepal
started its milestone journey in IT development in 2061 B.S. After approval
from the cabinet, the much awaited IT landmark, The Cyber Law 2061 B.S., also
known as the Electronic Transaction and Digital Signature Act(ETDSA) was
released on 2061 B.S.
The law has number of positive
provisions. As per the new law, activities such as hacking, deleting
information, stealing document and software, pasting wrong information and
improper and illegal materials would be brought under cyber-crime.
After introducing this law, the
government can punish cyber criminals - both an individual or intuitional with
up to five years of imprisonment and a fine of up to Rs. 50000 of both - based
on severity of their crime. Before introducing this law, government was dealing
with cyber crimes. under the public act.
Chapter 5 - State of art in computer technology
As we know the most fast
changing technology is the computer technology. AI, Internet, multimedia etc
are the present days technology.
Multimedia
It is a combination of two or
more media such as text, graphics or sound. All the tv show is an example of
multimedia. Basically a computer system with the capabilities to capture,
digitize, compress, decompress and present information is multimedia system.
Role of multimedia
Multimedia
tools
Text: It
is one of the basic tools of multimedia, where the text can be displayed in
different format. This also includes both unformatted text , formatted text
with numbers etc.
Hypertext: It
creates a link to another page. In hypertext document, the content is organized
in tree structure. Each node in the tree is called the page. Each hypertext
page hot words that hint the additional information. Hot words can respond to
the user. When user click on the hot words or the hot spots , the user will be escaped
from one topic to another.
Hypermedia:
Hypermedia consists of hypertext combined with still or moving images. It
requires the software to hypermedia that makes the presentation attractive. It
requires a large input of data for audio, video and animation, for which a
large amount of space on the ROM is needed.
Graphics
and images: images can be defined as a static representation,
this includes computer generated images, comprising lines, circles , curves and
digitized images of documents.
Simulation: It
is a process that tries to reproduce real world events or processes under
controlled laboratory conditions.
Animation:
Animation is one of the important tools of multimedia presentation. Animation
refers to moving of graphics. Animation on multimedia presentation is the
series of images that displayed in rapid succession, which give illusion of
movement.
Computer animation is created by projecting
still pictures, called cells, one after another at the rate of 30 per second.
When the cells are projected fast enough, the illusion will be smooth motion.
Computer animation also done by projecting a series of still images called
frames. Using animation software as AutoCAD, 3D studio Max etc we can animate
or mix up more than one image frames.
Video: This
includes short sequences of moving images known as video clips and by combining
all these clips together we can get full movie.
Sound: To
make any of the presentation more effective sound is used. The sound we hear is
analog signals and are digitized and stored in the disks like other data. Some
of the things become useless without sound, such as: presentation of the heart
beat.
2D
animation: It is also known as pixel based or cell
animation, where flat images are presented with two views (length and breadth).
3D
animation: It is also similar to 2D but the only difference
is that , in this case real images are created, i.e. length, breadth as well as
depth are shown of a element.
Application
of multimedia
1.
Multimedia
in entertainment: One of the most important fields of
multimedia is entertainment. Initially multimedia is used for computer games
but now days it is extensively used for movie making.
2.
Multimedia
in edutainment: It is also known as educational
entertainment. Many games with the purpose of learning are used in the recent
days with the help of multimedia.
3.
Multimedia
with new software: Software has become one of the
drastic changing technologies of the recent developed system. Each and every
companies that were using different types of software were also been using the
multimedia along with the particular software, so that it become easy for the
user to use and understand.
4.
Multimedia
in education: Huge growth of multimedia has been made in the
field of education for both teacher as well as students. Various information
are kept in different sites so that just typing the name of the particular
sites one get information related with it.
5.
Multimedia
in production and sales: In order to enhance the production
as well as the sales of the goods different types of multimedia and graphics
are used to make the advertisement attractive. It is done to promote the market
of the products.
6.
Multimedia
in web page: In the very first stage when the web pages were
introduced, it is in the form of text only which is not so effective. But the
multimedia has changes the face of the web page.
7.
Videoconference: One
of the important applications of multimedia is video conference, which is done
if any meeting has to be performed from various parts of the places. If any
discussion, sharing of the views and ideas, planning for the projects, making
presentation etc have to be performed from far distance, it is possible only by
the help of video conferencing in Internet, which is very effective with the
help of multimedia to make the video conferencing more effective.
E-
Commerce
E-commerce is broadly defined as the use of
telecommunication or wide area networking to carry out financial transactions.
With the help of e-commerce one can make a great deal of online shopping,
banking, reservation in hotels as well as air tickets and theatre tickets, hire
car. One can also buy and sell shares and also can apply for the distant
learning buy making the payment sitting at home.
Artificial
Intelligence (AI)
AI is the term which consists
of different fields from machine vision to the expert system. Machine vision is
the process of performing the tasks by the machine. Expert system is the
software which utilizes the knowledge base collected from human specialist in
certain area and helps user refer to this expertise in making their own
decision.
In case of AI, basically it has knowledge base and
programming technique.
Basic
applications of AI
Game
playing:
In case of logical games such as chess and many more, there are some functions
of AI related. That can be calculated by the volume of the game we are using.
Understanding
natural languages: Computer can able to understand the
machine level language, which is also some sort of AI implementation.
Expert
system:
One of the very famous techniques of the AI is Expert System. Here the
knowledge engineer interviews the expertise of the particular field and feed
their knowledge in the computer for some specific tasks.
Chapter 6 - Object Oriented Programming (OOP)
The major objective of the
development of OOPs is to overcome the flaws related with procedural languages.
Some of the striking features
of OOP are:
- Emphasis on data rather than procedure.
- Programs are divided into what are known as Objects.
- Data structures are designed such that they characterize the objects.
- Objects may communicate with each other through functions.
- New data and functions can be easily added whenever necessary.
- Follow bottom up approach in program design.
OOP is the most recent concept
among programming paradigm and still means different things to different
people. We define OOP as "OOP is an approach that provides a way of
modularizing programs by creating partitioned memory area for both data and
functions that can be used as templates for creating copies of such modules on
demand".
Basic concepts of OOPs are:
Object oriented programs have
following concepts:
1.
Objects
2.
Classes
3.
Data abstraction
4.
Data encapsulation
5.
Inheritance
6.
Polymorphism
7.
Dynamic binding
8.
Message passing
1.
Objects:
It is considered
as
basic runtime entities in an object oriented system. This may represent a
person, a place, a bank account, a table of data or any item that the program
must handle. When a program is executed, the objects interact by sending
message to one another. For example "customer" and "account"
are two objects in a program, then the customer object may send a message to
the account object requesting for the bank balance. Each object contains data
and code to manipulate the data. Objects can interact without having to know details
of each other's data or code. It is sufficient to know the type of message
accepted and the type of response returned by the objects.
2.
Class:
A class
is a collection of objects of similar type. For example: mango, apple, orange
are the member of class fruit. Basically, class is a description of the
object's attributes.
3.
Data
abstraction and Encapsulation:
Wrapping up of data and functions into a
single unit (called class) is known as encapsulation. Data encapsulation is a
most striking feature of a class. The data is not assessable to the outside
world and only those functions which are wrapped in the class can access it.
These functions provide the interface between the object's data and the
program. This insulation of the data from direct access by the program is
called data hiding.
Abstraction refers to the act of
representing essential features without including the background details or
explanation. Classes use the concept of abstraction and are defined as a list
of abstract attributes such as size, weight and cost and functions to operate
on these attributes. They encapsulate all the essential properties of the
object that are to be created. Since the classes use the concept of data
abstraction, they are known as Abstract Data Types (ADT).
4.
Inheritance:
It
is the process by which objects of one class acquire the properties of the
object of another class. It supports the property of the hierarchical
classification. For example: the bird Robin is a part of class flying bird
which is again a class of bird. The inheritance gives us an idea of
reusability. It is always nice if we could reuse something that already exists
rather than creating the same all over again. It save time as well as money and
also increase reliability. C++ supports the same properties, as once a class
has been written and tested, it can be used at the next time when required.
This is usually done by creating the new class and reusing the properties of
the existing one. The mechanism of deriving the new class from the old one is
called inheritance or derivation.
The
derived class inherits some or all of the traits from the base class
5.
Polymorphism:
It is also another important OOPs concept.
Polymorphism means the ability to take more than one form. Fro example: Shape,
it gives us an idea of different types of construction, such as circle,
rectangle, triangle etc. In this way we can say that polymorphism plays an
important role in allowing objects having different internal structures to
share the same external interface. In order implement the inheritance,
polymorphism is basically used.
6.
Dynamic
binding: Binding refers to the linking to a procedure call
to the code to be executed in response to the call. Dynamic binding means that
the code associated with a given procedure call is not known until the time of
call at runtime. It is associated with the inheritance and polymorphism.
7.
Message
passing
An
object oriented program consists of a set of objects that communicate with each
other. Objects communicate with one another by sending and receiving information
much the same way as people pass message to one another. The concept of message
passing makes it easier to talk about building systems that directly model or
stimulate their real world counter parts.
The message for an object is a request for
execution of procedure and therefore will invoke a function in the receiving
objects that generates the desired result. Message passing involves specifying
the name of the object, the name of the function and the information to be
sent.
Benefits
of OOPs
·
Through inheritance, we can eliminate
redundant code and extend the use of extending classes.
·
Software complexity can be easily
managed.
·
Object oriented systems can easily
upgrade from small to large systems.
·
It is easy to partition the work in a
project based on objects.
Chapter 7 - 'C' Programming
'C' is a programming high
language. It is also called middle level language because it combines elements
of a high level language with some features of assembler. A high level language
tries to give programmer everything through built-in the language. A low-level
language forces programmer to define function directly from the user language.
It is developed and written by Dennis Ritchie at Bell Telephone Laboratories in
U.S.A.
in 1972,
It is structured programming language. The
important features of the structure programming language is that it uses
blocks. A block is a set of statements that are logically connected. Structure
programming also supports loop structure, such as do.while, for etc.
Character Set
'C' can
supports all characters from the keyboard. There are mainly three types of
character sets in 'C'
1.
Alphabet [ A to Z or a to z]
2.
Numbers [0 to 9]
3.
Special Symbols ( !, @, #, $,
%,&,*, ^ etc.)
C
Tokens
In a C source program, the
basic element recognized by the compiler is the token. Token is the smallest
individual unit in a program. In any programming language, a program is made up
of individual syntactic elements, called tokens. These include identifiers,
keywords, constants and variables, operator.
Identifiers
:
Names given to various program
elements such as variables, functions, labels, and other user defined items is
known as identifier. It can be a combination of letters, digits and
underscore(_), in any order.
Keywords
Keywords are the special words
reserved by the compiler. These are also called reserved words. We cannot use
these words as a variable name. There are mainly 32 keywords in 'C'. These are
given below:
int
float double long sort unsigned void
if else case do while for far
default struct union char switch
static return signed auto break const
continue
goto register
typedef enum near extern
Data Types
Data type refers what types of
data can be stored in a particular variable. There are different type of data
types in C. In 'C' we define data type before the variable.
Example, int x
; char name; float salary;
Data
Types
|
Description
|
Format
|
Size
in byte
|
Range
|
Char
|
Character
|
%c
or %s
|
1
|
0 - 255
|
Int
|
Integer
number
|
%d
|
2
|
-32768
to 32768
|
long
int
|
long
integer or long number
|
%ld
|
4
|
-4294967296
to 4294967295
|
short
int
|
integer
or short number
|
%d
|
2
|
-32768
to 32768
|
unsigned
int
|
unsigned
integer`
|
%u
|
2
|
0
to 65535
|
Float
|
single
precision point
|
%f`
|
4
|
6
digit decimal
|
Double
|
double
precision point
|
%lf
|
8
|
12
digit decimal
|
Here int, char and float are
the data types and x, name and salary are the variable.
Variables
Variables are the most
fundamental parts of any programming language. Variable is a symbolic name
which is used to store different types of data in the computer's memory. When
the user gives value to the variable, the value is stored at the same location
occupied by the variable. Variables may be of integer, character, string, or
floating type.
Rules in variable
1. Variables
name must be less than equal to 8 characters
2. The
point and space not allowed in variable name.
3. Variable
name must start with alphabet.
4. Instead
of point or space you type underscore( _ ).
5. If
you type capital letter in variable name then all statement you have to use
same case.
Rules
of doing programming
- The header file must be included before main according to the library functions which are used in the statement.
- The program starts with main( ) . It is a user defined function which runs the program.
- The program statements starts with middle bracket( { ) and ends with middle brackets ( } ).
- Each of the statement of the C program ends with semicolon ( ; )
- The functions, keywords or commands must be in small letter.
No comments:
Post a Comment
Rahul-Notes