Computer Full Notes
Computer Full Notes
Communication: The process of exchanging message between sender and receiver through any medium
using definite rule is called communication. If communication is done on a longer distance then it is
called tele communication.
Data communication: The process of exchanging data and information between several electronic
means and media through any medium using definite rule(protocol) is called data communication.
Components/Elements of communication
1. Sender
2. Receiver
3. Medium
4. Data
Modes of communication:
1. Simplex: Only sender sends information, receiver only receive the message. It is one way
communication. Eg, Television, radio
2. Half duplex: Sender sends the data while receiver receive the data and vice-versa. It is the two
way communication but one at a time Eg, Walkie-Talkie
3. Full duplex: It is two way communication in which sender and receiver both can send and
receive information at same time. Eg, mobile communication.
Computer network: A group of computer interconnected with each other through any medium using
definite protocol (rule) for the purpose of sharing data, information, hardware, software and other
resources. Services provided by the computer network.
1. Data sharing
2. Print service
3. File service
4. Database service
5. Application service
The medium through which data, information are transmitted from on point to another point in the
form of signals are called transmission media. There are two types of transmission media.
A) Wired/bounded/guided media: The transmission media in which data are transmitted physically
through cables or wire following a specified path.
a. Twisted pair: Wire are twisted with each other to reduce EMI(Electro Magnetic Interference).
1. UTP(Unshielded Twisted Pair): Inner pair of twisted cable are not covered/unshielded with outer
jacket. Hence, it has more EMI.
2. STP (Shielded Twisted Pair): Inner pair of twisted cable are covered/shielded with outer jacket.
Hence, it has less EMI.
b. Co-axial cable: These cable has higher bandwidth so, they are used in television broadcasting.
c. Fibre optics: These type of cable are made up with thin glass like material where data are transmitted
in the form of photons(light). They have high data transmission rate.
Media connector:
1. Twisted pair use RJ-45
B) Wireless/unbounded/unguided media: The transmission media in which data are not restricted to
travel in a closed path rather it can travel in open air. There is no any physical connection between
communicating device hence, called wireless.
a. Microwave: Sender and receiver station must be in same line of sight (LOS). They cannot penetrate
obstacle. Used for longer distance transmission. Satellite use microwave signal to uplink and downlink
data from and to earth.
b. Radiowave: Sender and receiver station may not be in same line of sight (LOS). They can penetrate
obstacle. Used by FM station and other local communicating stations.
c. Infrared: It use invisible red ray of light of electro magnetic spectrum for communication purpose. Eg,
television remotes, AC remote and many more.
Types of network
1. LAN: It stands for Local Area Network which connect device in smaller locations such as room,
building, organization etc. It is suitable of single organization. It generally use guided media to
connect devices.
2. MAN: It stands for Metropolitan Area Network which can connect devices in larger geographical
area such as town, city, village etc. It consist or two or more than two LANs. It use wired as well
as wireless media for connecting devices.
3. WAN: It stands for Wide Area Network which is set in a larger geographical are across city,
nation and even ocean. It is can be used by multiple organization. Internet is the example of
WAN, which is a public network across all around the world. They use wireless media for
communication.
Network architecture:
1. Client-server: In this type of architecture the devices in a network are connected to the centrally
located main computer of a network called server. User computers are called client. It provides
more security and control in a network. Server allows to mobilize all the resources available in
the network. Easier to collect data in centrally located servers.
Network Models:
1. Centralized model: This is a client-server model in which every devices of a network are
connected to the centrally located main computer.
2. Distributed model: This is the collection of several client-server model located at different
location, all connected to a centrally located server.
Network topology: The physical layout, geographical orientation, connection pattern or arrangement of
computer or devices (node) in the network is called network [Link]:
1. Bus topology: In this topology, every devices in the network are connected to a main single
cable called trunk or backbone. It is easy and cheaper to setup. It require less amount of cables
and adding new devices in a network is also easy. Where as, if there is fault in main cable then
whole network will collapse. Fault finding is fairly difficult.
Bus Topology
1. Star topology: In this topology, every devices in the network are connected to the centrally
located device called hub which allows us to easily expand the network. Fault finding is very
easy in this type. Whole network depends upon the hub so, if it fails network will collapse. It is
expensive to setup but is most practical among all topologies.
Star Topology
1. Ring topology: In this topology, devices are connected with each other in circular manner each
device having equal rights and responsibilities. Failure in one device will collapse whole network.
Expanding network is difficult is not practical.
Ring Topology
1. Tree topology: It is the combination of bus and star topology. Whole network depends on main
cable and some part depend on hub so It is less reliable.
Tree Topology
1. Mesh topology: In this topology, networking device are point to point connected with each
other creating a mesh. If one device fails to work then it will not affect whole network. It is
expensive and difficult to setup.
Mesh Topology
a. Bandwidth: The amount of data that can travel in a given transmission medium in unit time is called
its bandwidth. It is generally known as data transmission speed and measured in terms of bps (Bit per
second)
b. Protocol: The set of rules that guides the communication in the network. It is the language used by
computers and electronic devices to communication with each other. For eg,
c. Network operating system (NOS): It is the collection of program that helps to mobilize and manages
resources of the network. For eg, Windows NT, Linux etc
Inter networking devices/hardware: Devices that are used to establish and expand network are called
inter networking devices.
1. NIC(Network Interface card): It physically connects computer system with transmission cable.
2. Router: Intelligent device that connects two or more network. It facilitates finding best route for
data transmission to destination.
7. MODEM: Modulator Demodulator transfer analog signal into digital (Modulation) and vice versa
(Demodulation)
8. Multiplexer: It combines multiples incoming signal into one signal and opposite is called de-
multiplexer.
Internet is a network of network that connects millions of user and device all around the world together
using TCP/IP (Transmission Control Protocol / Internet Protocol) and allows to share data and
information in-between.
1. Email: The way of exchanging mails i.e message between sender and receiver over internet
using unique address (email address) is called email. Advantage of email: Faster, Cheaper,
Reliable, Always available, Secured
2. E-commerce: The process of buying and selling goods and services is called e-commerce. Eg,
daraz, amazon, alibaba
5. Video conferencing: It allows user to communicate in real time using video and audio signal.
The application program which allow user to browse web site from internet are called web browser. It
establish the communication between user and web-server so that user can access content of the web.
It use HTTP (Hyper Text Transfer Protocol) to communicate. Eg, Google chrome, Mozilla Firefox, Opera,
Safari, Microsoft edge (Internet Explorer), Netscape navigator.
EmailPostal serviceIt is the modern digital way of exchanging [Link] is traditional way of
exchanging [Link] of computers and [Link] of papers, post box and post officeIt is faster
and reliableIt is slower and non reliableRecipient not requiredRecipient [Link] is always available
365 days a [Link] may not be always availableHighly [Link] secured.
9. Web server: The storage location where every content of website are store.
11. Search engine: The web application which allows user to search content in WWW by using
keyword. Eg, google, bing.
12. Downloading: Transferring data and file from web server to user.
13. Uploading: Transferring data and file from user to web server.
Cyber law: The law which governs all the legal issues of cyber space, controls cyber crime, provide legal
status to online transaction and covers several activity related to internet is called cyber law.
Cyber law in Nepal was introduced in 30th Bhadra 2061 BS (15th September 2004 AD). The name of the
cyber law of Nepal is “Electronic Transaction and Digital Signature Act - Ordinance.
Computer ethics: The moral principles and values or the code of conduct that must be followed by every
computer user is called computer ethics. Commandments of computer ethics.
Cyber crime: The criminal activity or a crime committed by using computer, internet or any electronic
means and media is called cyber crime. Cyber criminal are also considered as a criminal hence, cyber law
has appropriate provision of punishing the cyber criminals. For eg, piracy, hacking, cyber bullying,
phishing, salami saving, pornography, data diddling, spreading computer virus etc
Terms to understand:
1. Intellectual property right: The law through which the creation(music, art, writings etc) made by
creator gets actual reward and not being misused without proper compensation.
2. Patent right: The law through which inventor protect his/her invention(technological) from
being used without proper compensation.
3. Digital signature: It is the technology used to ensure the correct delivery of message over a
network. It use private and public key for encryption and decryption of data.
4. Encryption: The feature by which readable data and message are converted into unreadable
code and its vice versa is called decryption.
6. Trade secret: The main secret principle or philosophy of running unique business.
7. Hacker: The person who enter into other system without proper authorization.
1. Hardware security
2. Software security
Define hardware security? Give any four measures to protect the computer hardware.
The protection or securing computer from physical damage or loss is known as hardware security. It
deals with protection of computer hardware components and its peripheral. Following are the measures
of hardware security.
1. Regular maintenance
3. Insurance
7. Air conditioning.
Define software security? Give any four measures to protect the computer software.
The protection or securing computer data, information and software being damaged or lost knowingly
or unknowingly is known as computer security.
2. Keeping password
3. Backup
4. Use of antivirus
5. Fragmentation
6. Scandisk
Important Terms
5. Backup: Duplicate copies of original data file, so that we can access even original data gets lost
or damaged.
6. Fragmentation: The process of scattering part of same disk over random location
9. Antivirus: Software use to detect and eliminate virus from our computer system. Eg, AVG,
Norton, NOD32, Kaspersky etc
10. Power protection device: UPS, Volt guard, Spike guard, CVT
11. UPS: Un-interruptable Power Supply provides power backup when there is electric power
failure.
12. Volt guard/CVT: They regulate incoming voltage and maintain uniform power supply. They do
not provide backup power.
Computer virus: It is a computer program that replicates(multiplies) itself and destroys data, files and
program of our computer system. Types of computer virus
1. Boot sector: Infects master boot record (MBR) of our computer system. (Booting refers to
starting of computer system)
2. File infector or program infector virus: Infect programs or executable files (.exe, .dmg, installer
files)
4. Macro virus: Infects certain files created using macros such as MS-Word, MS-Excel etc
5. Stealth virus: Which can hide from being detected. Its hard to detect
6. Trojan horse: They does not replicate but are installed once then it starts malfunctioning.
4. To entertain user.
Antivirus: It is an utility software that helps to detects and eliminates computer virus from the
computer. For eg, AVG (Antivirus Guard), NOD 32, Norton, Kaspersky, Panda antivirus, PC-Cillin, Avast
etc
Unit 4: E-Commerce
E-Commerce: The process of buying and selling goods, services and information through internet is
called E-Commerce. It basically refers to electronic transaction done over a communication network i.e.
internet.
Note: E-mail, Fax, Online payment, Online Security, Web services, Information sharing are some the
widely used technology in E-Commerce
Types of E-Commerce:
a) Business to Customer (B2C): The business relationship between business organization and final
customer. E-Commerce website plays intermediary role between business organization and final
consumer. amazon performs B2C.
b) Business to Business (B2B): This type of e-commerce is conducted between companies. Individual
consumer cannot buy from this type of e-commerce. For example, manufacturing companies sells goods
to wholesalers. alibaba performs B2B.
c) Consumer to Consumer (C2C): This type of e-commerce is conducted between consumers. For
example, second hand or used products can also be brought online using site like hamrobazaar. These
platforms acts as a third-party where consumers can directly interact with each other and can perform
transaction between them.
Importance of M-Commerce:
1. Widely used technology. Almost every people in this days used mobile phone.
b) Online payment: Online payment is the process of performing transaction without using cash. It
generally refers to paper less transaction using modern days solution i.e. payment gateway. through
internet. Several modes of E-payments are: credit card, debit card, electronic fund transfer (EFT), E-
cheque etc.
Contemporary Technology refers to the latest innovation and technology that has become a part of our
daily life. These technologies has great influence over a life of human. Services like E-mail, E-Commerce,
Chats, Video Conferencing, Live streaming are some of the common contemporary technology that we
encounter on daily basis.
1. Cloud computing: Cloud generally refers to huge collection of storage which are done through
server farms. The trend of using a network of remote servers/data center hosted on the internet
to store, manage, and process data, rather than in our local server or a personal computer is
called cloud computing. Google Drive, one drive, iCloud are an example of cloud storage.
2. Mobile Computing: The use of handheld devices such as mobile phone and tablets to transfer data,
voice and video over a network is called mobile computing. These technology allows people to access
data and information from whenever and wherever they are.
2. Mobiles and other handheld devices can be connected in a network to exchange data and
information
3. E-Governance: The set of services provided by the government to their public through electronics
means specially internet is called E-Governance.
Advantages of E-Governance
3. It reduces corruptions.
Machine learning, Robotics, cyber security, health care etc are the application areas of AI.
Advantages of AI:
5. Virtual Reality: It is an artificial environment created by using the computers and technology to give
user a realistic experience. In short it is a simulated environment created using computerized
technology. It creates an illusion of the real world. VR are used in film industry, gaming, aviation industry
etc.
Advantages of VR:
2. Simulation of complex problem. eg, Pilot learns their first flying experience in simulated
environment.
6. Internet of Things (IOT): IoT are the electronic technology in which devices can communicate with
user and its environment in real time. These devices can share data and information between user and
its server allowing user to experience the combination of physical world with digital.
In general IoT is the network of real world “Things” (devices) made with sensors, software and other
various technology that can communicate with user and devices through internet.
Modern days devices like smart watch can track our fitness level, voice assistant in our mobile phones
like Siri and Alexa, smart car like Tesla built with autonomous riding capability, home security system
that allows to monitor suspicious activities and more.
Advantages of IoT
Altogether from number system 4 marks question will be asked. 2 numerical will be from Number
system conversion whereas 2 numerical will be from Binary operation i.e Binary addition, subtraction,
multiplication and division.
All the possible problem are solved in the given video link.
Unit 7: DBMS
Data: Data are the raw facts and figure with are isolated and uninterpreted generally represented by
letter and numbers. Data undergoes processing. Eg, 32, John, 12
Information: The collection of meaningful result obtained after processing raw data. They are generated
after processing. Eg. John is 32 years old and he reads in class 12.
Database: The systematic and scientific collection of data that can access quickly whenever required is
called database. It is the organized way of collecting and keeping data and information. E.g. Dictionary,
telephone directory, marks ledger, attendance register.
DBMS: DBMS stands for Database Management System which is the collection of software that is used
to manages database i.e. storing, manipulating and retrieving data systematically and scientifically. It is a
software used to store, process and access data and information whenever required. Eg, MS-Access, MY
SQL, Oracle, dBase, Foxpro
Advantages of DBMS.
MS-Access: It is a DBMS developed by Microsoft corporation for organizing data in the form of tables. It
allows user to add, edit, delete, sort, modify, share and print records. Feature of MS-Access.
A) Table: The primary building block of DBMS where data are organized in the tabular form i.e rows and
columns. The columns of database table are called field whereas, rows are called record. Importance of
table.
B) Form: The element/object of database which allows user to enter new datas and edit the existing one
easily through user friendly interface. Importance of form.
C) Query: The importance object of database which is used to retrieve/access and interpret the
information according the user requirement. Importance of query.
Types of Query
1. Select query: Used to retrieve data from one or more table depending upon the condition.
2. Action Query: Used to make changes to records available in database. Types are
3. Update query: Used to make global (All at once) changes to several records in different table.
4. Append query: Used to add more records in existing one or more tables.
5. Delete query: Used to delete one or more record from one or more tables.
6. Make-table query: Create new table link one or more available tables in database/
D) Report: The object of database which is used to generate result after processing data in a database. It
is the effective way of displaying data either in soft copy (monitor) format or hard copy (printed) format.
Important of report.
Data types: The characteristics of field that specifies what kind of data can be stored in the given field is
called data types. Following are the data types used in MS-Access.
Field properties
1. Field size: It is used to set the maximum size for the data stored in a given field. For eg,
maximum characters (size) store in text field is 256 characters. Default field size is 50.
2. Format: It is used to display formatted output that means data can be display in different
formats and layouts. For eg, < (Display content in lower case), > (Display content in upper case).
3. Input mask: It is used to specify the format in which data can be entered.
4. Caption: It is used to display alternate name for the field to make it more descriptive. It can
contain 2048 characters.
5. Default value: It is the value or information that is displayed automatically when we add a new
record in table for a field.
6. Validation rule: It enables user to limit values that can be accepted by particular field. It can
contain 2048 characters.
7. Validation text: The message that is displayed when validation rule is violated or not followed.
8. Required: It is used to specify whether the data must be enter or not in the particular field.
9. Indexed: It is used to speed up the searching and sorting of record from the database table.
2. Primary key([Link]): The key or field that is used to uniquely identified records from the
database table is called primary key. It must be unique and cannot be kept empty(null).
Importance of primary key.
8. Table relationship: The logical link between two or more than two tables of database using
unique key fields is called table relationship. Types are: one to one, one to many, many to many.
9. Sorting: Arranging data in a particular order of field i.e. ascending or descending is called sorting.
Helps in faster access of data.
10. Filtering: The process of making selection of record depending upon the supplied criteria is
called filtering. Helps in faster access of data.
11. DBA: DBA stands for Database Administrator is a person or specialist who is responsible to
manages and monitor overall resources and operation (such as analyzing, planning, operating,
implementing and securing) associated with DBMS. Responsibilities of DBMS.
Click here for Series and patterns using FUNCTION … END FUNCTION
CLS
CALL SERI
END
SUB SERI
a=0
b=1
PRINT a;b;
FOR i=1 to 20
c=a+b
print c;
a=b
b=c
NEXT i
END SUB
• 1 2 3 6 11 20 ….10th term
CLS
CALL series
END
SUB series
a=1
b=2
c=3
PRINT a; b; c;
FOR i = 1 TO 10
d=a+b+c
PRINT d;
a=b
b=c
b=d
NEXT i
END SUB
• 1 2 4 7 11 ...............10th term
CLS
CALL SERI
END
SUB SERI
a=1
g=1
FOR i=1 to 10
print a
a=a+g
g=g+1
NEXT i
END SUB
• 1 2 5 10 17 ..............10th term
CLS
CALL SERI
END
SUB SERI
a=1
g=1
FOR i=1 to 10
print a
a=a+g
g=g+2
NEXT i
END SUB
• 3 12 27 48 ................10th term
CLS
CALL SERI
END
SUB SERI
FOR i=1 to 10
a= 3*i^2
PRINT a;
NEXT i
END SUB
CLS
CALL SERI
END
SUB SERI
FOR i=0 to 6
a= 5^i
PRINT a;
NEXT i
END SUB
• 5 10 20 35 55 ................10th term
CLS
CALL SERI
END
SUB SERI
a=5
g=5
FOR i=1 to 10
print a
a=a+g
g=g+5
NEXT i
END SUB
CLS
end
h =s\3600
rs = s MOD 3600
m = rs\60
sec = rs MOD 60
End Sub
2. To display and count all the vowels and consonant from the given string.
CLS
END
FOR I = 1 TO LEN(N$)
X(N$,I,1)
X(X$)
V = V+1
ELSE
C=C+1
END IF
NEXT I
END SUB
cls
end
for i = 1 to n
If n MOD i = 0 then
print ;i
end if
next i
end sub
end
for i = 1 to 10
m=n*i
print m;
next i
end sub
QBASIC programming altogether covers 18 out of 50 marks in SEE examination. QBASIC programming
grid for SEE is as follows.
According to new grid these are the frequently repeated questions for Combination of SUB procedure
and FUNCTION (Click Here)
Write all the following programs using both Sub....End Sub and Function.....End Function.
1) To convert Celsius temperature scale into Fahrenheit temperature scale. [ (C-0)/100 =(F-32)/180 ]
CLS
F = (18*C+320)/10
END SUB
CLS
X = TEMP (C)
END
F= (18*C+320)/10
TEMP = F
END FUNCTION
CLS
END
IC = N/1.6
END SUB
DECLARE FUNCTION CONVERT (N)
CLS
X = CONVERT (N)
END
IC = N/1.6
CONVERT = IC
END FUNCTION
CLS
END
FOR I = 1 TO N
S = S+I
NEXT I
END SUB
CLS
END
FOR I = 1 TO N
S = S+I
NEXT I
SUM = S
END FUNCTION
CLS
END
F=1
FOR I = 1 TO N
F = F*I
NEXT I
END SUB
CLS
END
F=1
FOR I = 1 TO N
F = F*I
NEXT I
FACT = F
END FUNCTION
CLS
END
av = (a+b+c)/3
END SUB
CLS
X = AVG (a,b,c)
av = (a+b+c)/3
AVG = av
END FUNCTION
CLS
END
a = LEN(a$)
b = LEN(b$)
c = LEN(c$)
ELSE
END IF
END SUB
CLS
INPUT "Enter three string"; a,c$
X (a,c$)
END
a = LEN(a$)
b = LEN(b$)
c = LEN(c$)
LONG
LONG
ELSE
LONG
END IF
END FUNCTION
CLS
END
IF N>0 THEN
ELSE
END IF
END SUB
CLS
x (N)
PRINT X$
END
IF N>0 THEN
CHECK$ = "Positive"
CHECK$ = "Negative"
ELSE
CHECK$ = "Zero"
END IF
END FUNCTION
CLS
END
WHILE N <>0
R = N MOD 10
S = S+R
N = N\10
WEND
END SUB
CLS
X = SUM (N)
END
WHILE N <>0
R = N MOD 10
S = S+R
N = N\10
WEND
SUM = S
END FUNCTiON
CLS
END
P=1
WHILE N <>0
R = N MOD 10
P = P*R
N = N\10
WEND
END SUB
CLS
X = PRODUCT (N)
END
P=1
WHILE N <>0
R = N MOD 10
P = P*R
N = N\10
WEND
PRODUCT = P
END FUNCTION
10) To check whether the given number is palindrome or not. [1221 is palindrome]
CLS
END
Z=N
WHILE N <>0
R = N MOD 10
S = S*10+R
N = N\10
WEND
IF Z=S THEN
ELSE
END IF
END SUB
CLS
INPUT "Enter any Number"; N
X (N)
PRINT ; X$
END
Z=N
WHILE N <>0
R = N MOD 10
S = S*10+R
N = N\10
WEND
IF Z=S THEN
ELSE
END IF
END FUNCTION
11) To check whether the given number is armstrong or not. [153 is armstrong]
CLS
END
Z=N
WHILE N <>0
R = N MOD 10
S = S+Rˆ3
N = N\10
WEND
IF Z=S THEN
ELSE
END IF
END SUB
CLS
X (N)
PRINT ; X$
END
Z=N
WHILE N <>0
R = N MOD 10
S = S+Rˆ3
N = N\10
WEND
IF Z=S THEN
ARM$ = "Given number is Armstrong"
ELSE
END IF
END FUNCTION
CLS
END
FOR I = 1 TO N
IF N MOD I = 0 THEN
C = C+1
END IF
NEXT I
IF C = 2 THEN
END IF
END SUB
CLS
PRINT X$
END
FOR I = 1 TO N
IF N MOD I = 0 THEN
C = C+1
END IF
NEXT I
IF C = 2 THEN
ELSE
END IF
END FUNCTION
CLS
END
WHILE N <>0
R = N MOD 10
IF R MOD 2 = 0 THEN
S = S+R
END IF
N = N\10
WEND
END SUB
CLS
X = SUM (N)
END
WHILE N <>0
R = N MOD 10
IF R MOD 2 = 0 THEN
S = S+R
END IF
N = N\10
WEND
SUM = S
END FUNCTION
CLS
INPUT "Enter any Number"; N
END
P=1
WHILE N <>0
R = N MOD 10
IF R MOD 2 = 1 THEN
P = P*R
END IF
N = N\10
WEND
END SUB
CLS
X = PRODUCT (N)
END
P=1
WHILE N <>0
R = N MOD 10
IF R MOD 2 = 1 THEN
P = P*R
END IF
N = N\10
WEND
PRODUCT = P
END FUNCTION
15) To check whether the given string is palindrome or not. [ MADAM is palindrome]
CLS
END
X(N$,I,1)
W+X$
NEXT I
IF N THEN
ELSE
END IF
END SUB
CLS
INPUT "Enter any string"; N$
A (N$)
PRINT A$
END
FUNCTION PALIN)
X(N$,I,1)
W+X$
NEXT I
IF N THEN
ELSE
END IF
END FUNCTION
16) To input a string and count how many times the first letter of the same string repeats. [ ie. BABY B
repeats 2 times ]
CLS
END
A(N$,1)
FOR I = 1 TO LEN(N$)
X(N$,I,1)
IF A THEN
C = C+1
END IF
NEXT I
END SUB
CLS
X = COUNT (N$)
END
A(N$,1)
FOR I = 1 TO LEN(N$)
X(N$,I,1)
IF A THEN
C = C+1
END IF
NEXT I
COUNT = C
END FUNCTION
CLS
INPUT "Enter any string"; N$
END
FOR I = 1 TO LEN(N$)
X(N$,I,1)
X(X$)
C = C+1
END IF
NEXT I
END SUB
CLS
X = COUNT (N$)
END
FOR I = 1 TO LEN(N$)
X(N$,I,1)
X(X$)
C = C+1
END IF
NEXT I
COUNT = C
END FUNCTION
CLS
END
FOR I = 1 TO LEN(N$)
X(N$,I,1)
X(X$)
ELSE
W+x$
END IF
NEXT I
PRINT W$
END SUB
CLS
A (N$)
PRINT A$
END
FUNCTION DISPLAY)
FOR I = 1 TO LEN(N$)
X(N$,I,1)
X(X$)
ELSE
W+x$
END IF
NEXT I
DISPLAY
END FUNCTION
19) To display given string into alternative capital and small letters. [ NePaL ]
CLS
END
FOR I = 1 TO LEN(N$)
X(N$,I,1)
IF I MOD 2 = 0 THEN
X(X$)
ELSE
X(X$)
END IF
W + X$
NEXT I
PRINT W$
END SUB
CLS
A (N$)
PRINT A$END
END
FUNCTION ALTER)
FOR I = 1 TO LEN(N$)
X(N$,I,1)
IF I MOD 2 = 0 THEN
X(X$)
ELSE
X(X$)
END IF
W + X$
NEXT I
ALTER
END FUNCTION
1. Write a program to create a sequential data file named "[Link]" and store Roll number,
Name, Address and Class of a student.
2. Write a program to create a sequential data file named "[Link]" and store Roll number,
Name, Address and Class of few students.
3. Write a program to add few more record in a data file named "[Link]" which contains Roll
number, Name, Address and Class of few students.
4. Write a program to display all the records from data file named "[Link]" which contains Roll
number, Name, Address and Class of several students.
5. Write a program to display only those records whose name starts with "K" from data file named
"[Link]" which contains Roll number, Name, Address and Class of several students.
6. Write a program to display only those records who lives in "POKHARA" from data file named
"[Link]" which contains Roll number, Name, Address and Class of several students.
7. Write a program to count and display only those records who reads in class 10 from data file
named "[Link]" which contains Roll number, Name, Address and Class of several students.
8. Write a program to display only those records whose roll number is in from 20 to 30 from data
file named "[Link]" which contains Roll number, Name, Address and Class of several
students.
9. Write a program to count only those records who doesn't lives in "POKHARA" from data file
named "[Link]" which contains Roll number, Name, Address and Class of several students.
10. Write a program to delete all those records whose address is "KATHMANDU"from data file
named "[Link]" which contains Roll number, Name, Address and Class of several students.
Q) A sequential data file named "[Link]" contains Roll number, Name, Class and Marks obtained in 5
different subject i.e Maths, Science, English, Nepali, Computer. Let us consider Pass mark to be 40 and
Full mark to be 100 then answer all the following questions.
• Write a program to display all the name of students who failed in any one or more of the
subject.
• Write a program to count total number of students who passed in all the subject.
• Write a program to calculate and display percentage of all the students along with the roll
number and name.
• Write a program to display name of the students who failed only in English and Nepali.
• Write a program to delete all the records of students who failed in any one or more of the
subject.
Unit 9: Programming in C
click here for complete notes of C programming with program example for SEE class 10.
Introduction
Features of C language.