Notes Software Concepts Arrays 2023
Notes Software Concepts Arrays 2023
1)System software
A) Operating system
B) Language translators
C) Utility software
2) Application software
A) General purpose
B) Specific purpose
System software
1) Operating system
2) Language translators
3) Utilities
1)Operating system
Computer languages
Advantages
It is machine dependent.
Debugging is difficult.
It is difficult to modify.
2.Assembly language
A low level programming language that allows a user to write programs using letters
and symbols which are more easily remembered. The symbolic instruction codes of machine
language are referred to as mnemonics.
Advantages
Disadvantages
It is machine dependent.
High level programming languages are English like languages and are machine independent.
Different high languages are BASIC, PASCAL, C, COBOL, FORTRAN, C++, JAVA etc.
Advantages
It is machine independent.
Disadvantages
Slower in execution.
2.Language Translators
1. Assemblers
2. Compilers
3. Interpreters
Assembler
Compilers
Compiler is a translator that translates the program written in a high language to its equivalent
machine language code of the computer.
Interpreters
3) Utilities
Utilities are the programs that assist the computer by performing useful functions like scanning
viruses, backing up disk etc. Utility software are generally called as Application Oriented ready-made
system programs.
Some of the important utilities are Text Editor, Backup Utility, Antivirus software etc.
Once an executable program is generated it has to be loaded into the main memory
of the computer execution. This operation is performed by system software called as the loader.
Application software
A Software that has been written to process a task. It is generally written in high level languages.
It is classified into two types - General purpose and specific purpose. Examples of general purpose
software are - Microsoft Word, Excel etc.
Memory management
Process management
Device management
File management
Allocation
De allocation
Process management
Control access to shared resources like file, memory, I/O and CPU
Schedule a process
Device management
File Management
Secure files
The user interface is a set of commands or a graphical user interface using which the
user interacts with the applications and the hardware.
10.Multithreading models
It allows only one user to share the system resources including the CPU. DOS and Windows-
95, Windows-98 etc. are examples for such systems.
To speed up the processing, similar jobs were grouped together in the form of
batches and the user would run each batch. Payroll, forecasting, statistical analysis etc. are examples
for this.
This helps to execute many tasks at a time. For example, Windows operating system
supports editing, printing etc.
In this a number of users can work on the same computer at the same time. Only a
little CPU time is allotted for each user.
6) Online system
There are some situations where users need to get the result immediately after the
submission of the input. For example, ATM transactions.
7) Real-time systems
It processes the input data individually and generates the results with high speed. Overall
processing time is very less. It is generally used in satellite launching, flight control etc.
Data and applications are distributed among many system. It avoids the flooding of data to a
central system.ATM (Automatic Teller Machine) centers of a bank is an example of application of
distributed operating systems.
9) Network operating systems
An operating system oriented to computer networking, to allow shared file and printer
access among multiple computers in a network.Operating systems based on Microsoft Windows NT
technology, UNIX etc. are examples.
A thread is a lightweight process and is a basic unit of CPU utilization. A program or process
may have many threads which share the same code section, data section, and other OS resources.
Sun Solaris, Windows 2000, Multithreaded UNIX and Linux are examples for such systems.
DOS is a single user operating system. It was developed by Bill Gates and Paul Allen in 1980 for IBM
PCs.
Features
File management.
Directory management.
Command interpreter interprets commands and executes DOS functions, utility programs or
application programs.
2.UNIX OS
Unix was developed by Dennis Ritchie and Ken Thompson.
Features
Portability.
Multi user.
Multitasking.
Security.
Machine independent.
3.Linux OS
Features
Portability.
Multi user.
Multitasking.
Security.
4.Windows 7
Features
Multitasking.
Multiuser.
Easy installation.
Chapter 7: ARRAYS
Array
An array is an ordered collection of elements of same data type and same name.
Index
Subscript/index indicates the position of the element in the array.
The method of numbering the i th element with index i-1 is called zero based indexing.
Types Of Arrays
There are three types of arrays.
1) One-dimensional array
A collection of elements, all of the same type and name, structured in one dimension.
2) Two-dimensional array
A collection of elements, all of the same type and name, structured in two dimensions.
3) Multi-dimensional array
A collection of elements, all of the same type and name, structured in N dimensions
1)One-dimensional array
Syntax:
datatype arrayname[size];
Example
int marks[80];
Initialization of one dimensional array
Example 1 :
int a[5]={9,1,6,2,8};
Example 2
float weight[5]={1.5,2.8,2.5};
C++ program to read the elements into the array and printing the elements using 1d
array
#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
void main()
{
int a[100],i,n;
clrscr();
cout<<“Enter the number of elements ”;
cin>>n;
cout<<“Enter the elements ”;
for(i=0;i<n;i++)
cin>>a[i];
cout<<“The elements are ”;
for(i=0;i<n;i++)
cout<<a[i];
getch();
}
2) 2D array
Syntax:
datatype arrayname[row-size] [column-size];
Example
int A[8][2];
Initialization of TWO dimensional array
Example 1
int a[2][3]={10,9,1,6,2,8};
Array ‘a’ contains 2 rows and 3 columns.
a[0][0]=10 a[0][1]=9 a[0][2]=1
a[1][0]=6 a[1][1]=2 a[1][2]=8
Example 2
int a[2][3]={
{4,9},
{1}
};
Array ‘a’ contains 2 rows and 3 columns. We initialize the first two elements to the
first row, the next element to the second row. The remaining elements are automatically set to
zero.
a[0][0]=4 a[0][1]=9 a[0][2]=0
a[1][0]=1 a[1][1]=0 a[1][2]=0
3) Multi-dimensional array
Syntax:
datatype arrayname[s1][s2] ……..[sn];