What is Instruction ?
What is Program ?
The program is the set of instructions that command the computer to perform a particular operation or a specific task.
What is Software ?
A set of programs written for a computer to perform a particular task is called software.
Differences between Program and Software
S.N | Program | S.N | Software |
1. | Set of instructions that instructs the computer to perform certain particular operations. | 1. | Collection of programs with a series of instructions that instruct the computer how to solve the problem. |
2. | Program is created by a programmer. | 2. | Software is created by group of programmers as team work. |
3. | Ex: C program to input a number and check if it is even or odd. | 3. | Ex: Microsoft Office, WinZip, Internet Explorer, MS Windows Vista. |
What is Programming ?
Programming is to make machine work. Programming creates instruction set that a machine follows.
What is Programming Language ?
It is the set of written symbols and codes that instruct the computer hardware to perform specified tasks.
Types of Programming Language
A low-level language is a programming language that provides little or no abstraction of programming concepts and is very close to writing actual machine instructions. Two examples of low-level languages are assembly and machine code.
Low level languages are difficult and time consuming to develop the program. It can be classified into two types:
1. Machine language (1GL) :
2. Assembly language (2GL) :
2. Middle level language
The middle-level language is also known as the intermediate programming language and pseudo-language. The middle-level language is an output of any programming language, which is known as source code. The source code is written in a high-level language.
3. High level language
A high-level language is a programming language such as C, FORTRAN, or Pascal that enables a programmer to write programs that are more or less independent of a particular type of computer. Such languages are considered high-level because they are closer to human languages and further from machine languages.
High level language can be further categorized as:
1. Procedural oriented language (3GL)
2. Problem oriented language (4GL)
3. Natural language (5GL)
Data Types
A data type is a classification that specifies which type of value a variable has and what type of mathematical, relational or logical operations can be applied to it without causing an error.
A string is a data type that is used to classify text and an integer is a data type used to classify whole numbers.
For example:
Integer number (int) : 1, 2, 8545, 89
Decimal number (float/double): 2.34, 0.1234
Character (char): a, b, "GIT", "Name" etc
Boolean : True or False
Variable
Variables are used to store information to be referenced and manipulated in a computer program. They also provide a way of labeling data with a descriptive name, so our programs can be understood more clearly by the reader and ourselves. It is helpful to think of variables as containers that hold information. Their sole purpose is to label and store data in memory. This data can then be used throughout your program.
A variable that is declared inside the function or block is called a local variable. It must be declared at the start of the block. You must have to initialize the local variable before it is used. A variable that is declared outside the function or block is called a global variable.
Constant
A constant is a value that should not be altered by the program during normal execution, i.e., the value is constant.
Constants in C are the fixed values that are used in a program, and its value remains the same during the entire execution of the program. Constants are also called literals. Constants can be any of the data types. It is considered best practice to define constants using only upper-case names.
const int a=5;
const char name= "Suresh";
Algorithm
An algorithm is the finite set of step by step set of statements that solve a particular problem.
Flowchart
Find the sum of the two numbers.
1. START
2. Declare variables as a,b and c.
3. Read the two numbers a and b.
4. Add the number a and b and store in c .i.e c=a+b
5. Print c
6. STOP
No comments
If you have any doubts, Please let me know,