1
CHAPTER -1 STRUCTURE AND POINTER
1.
Array
Compare array and structure
Structure
A structure is a collection of different
data types (Heterogeneous)
The elements of a structure is accessed
using dot(.) operator
Structure is user defined data type
An array is a collection of similar data
type(Homogeneous)
The elements of an array are accessed
using an index
Array is derived data type
2.
Static and dynamic memory allocation
Allocation of memory for a variable during compilation time is known as static memory allocation. Once
the memory is allocated during compile time it cannot be expanded or compressed.
For example: int a[10] as integer; In this example during compilation the compiler will allocates 20
bytes .
The process of allocating memory during execution time is called dynamic memory allocation. This is
done using ‘new’ and ‘delete’ operators.
3.
Nested structure
A Structure placed inside another structure is called a nested structure.
Example
struct student
Struct address
{
{
Char name[20];
int rollno;
Char hname[20];
address y;
Char place[20];
int m1,m2,m3;
}
}x;
Here elements are accessed as
x.y.name, x.y.hname,x.y.place,x.rollno,x.m1,x.m2,x.m3 etc
4.
R-Value and L-value of a variable.
Consider the c++ statement Int a = 10, it mean that variable a holds value 10
Here name of the variable known as L value and Value 10 known as R-value
5.
Memory leak
Memork leak is a situation where once memory is dynamically allocated to a variable and if later the
memory is not de-allocated after its purpose is satisfied, the memory gets lost. This problem where
memory is dynamically allocated but not released ,hence not accessible to any problem is called memory
leak.
HSE II Computer science[Type text]
Page 1
2
6.
Self referential structure.
When a member of a structure is declared as a pointer to the structure itself,then the structure is called as
self referential structure.
For example:
struct chain
{
int val;
chain *p;
}; The structure has two members val and p.The member p is a pointer to a structure of type chain.
Some examples of self referential structures are linked list,stack,trees etc.
7.
String pointer
A string is an array of characters,and array name can be considered as a string variable.Every string in
C++ is terminated by a Null character(\0).For example the string hello is represented in memory as
Intializing an array
The above array can be initialized as
char ch[ ]=”hello”;
Advantages of character pointer
or
1. Strings can be managed by optimal memory
char ch={‘h’,’e’,’l’,’l’,’o’,’\0’};
space.
identify the errors
int *p , *q, a =5;
2.Assignment operator can be used to copy
strings.
float b=2;
3. No wastage of memory.
p =&a;
q=&b;
if(p<q) cout<<p;
ans:- the pointer q is integer type pointer, that cannot hold address of float variable b.
Read the C++ statement given below and answer the following questions
Int a[] ={12,15,25,56,38};
Int *p =a;
What is the output of the expression *p + *(a+2);
Ans := 37
The statement a++ is invalid, how does it differ from p++
Here a Is the name of array, that contains base address of the array, it cannot be changed.
HSE II Computer science[Type text]
Page 2
3
Char * name[7] what does it mean.
This array contain a maximum of 7 strings, where each string can contain any number of characters. But
we should make sure that the pointer array is initilised.
Char *week[7] = {“Sunday”,Monday”,”Tuesday”,”Wednesday”,”Thursday”,”Friday”,”Saturday”};
Structure pointer
Struct student
{
Int rollno;
Char name[20];
Float mark;
}*p;
Here structure elements are accessed by as follows
p->rollno, p->name,p->mark etc.
CHAPTER – 2 OOPS
8.
9.
Advantages of oops
Easy to maintain and modify code.
Provides modular structure for programs.
Code sharing.
Information hiding.
It is good for defining abstract data
It
implements real life scenario.
Basic concepts of oops
The main concepts of Object Oriented Programming are,
1)Objects:-Objects are real world objects such as a person, student, book car, TV ...etc. Objects are a
cobination of data and functions. An object has a unique identity, state and behaviour. Objects interact
with each other by sending messages.
2)Classes:-Classes are user defined data type which contained both data and function. A class is a
collection of objects. An object is an instance of a class. Objects communicate with each other by
message passing.
3)Abstraction:-Abstraction refers to displaying essential features by hiding other details. Data
abstraction separates interface and implementation. Abstraction provides data security.
HSE II Computer science[Type text]
Page 3
4
4)Encapsulation:-The wrapping up of data and function into a single unit is called encapsulation.It
prevents data from accidental modific-ations by external functions
5)Modularity:-Modularity is the process by which a larger program is sub-divided into smaller
programs called modules.
6)Inheritance:-Inheritance is the process by objects of one class acquires the properties of objects of
another class. The concept of inhe-ritance provides reusability. The existing class is called base class
and the new class is called derived class. Consider an apple and a banana. Although an apple and a
banana are different fruits, both have in common that they are fruits.
7)Polymorphism:-‘Poly’ means many,’Morph’ means shape. Polymorphism is the ability of an
objector function to take multiple forms.
10. Various type of inheritance
Single Inheritance
When a derived class inherits properties and behaviors of only one base class, it is called single
inheritance. Cricketer is a derived class from the base class Player.
Multiple inheritance
When a derived class inherits properties and behaviors of more than one base class, it is called multiple
inheritance. In following figure, AllRounder is a derived class from two base classes: Bowler and
Batsman.
Hierarchical Inheritance
When properties and behaviors of one base class are inherited by more than one derived class, it is
called hierarchical inheritance. In following figure, Bowler and Batsman are two derived classes from
same base class Cricketer.
HSE II Computer science[Type text]
Page 4
5
Multilevel Inheritance
When properties and methods of a derived class are inherited by another class, it is called multilevel
inheritance. In following figure, Cricketer is derived class from Player base class. Then Cricketer acts as
base class for the Bowler class.
Hybrid Inheritance
It is combination of multiple and multilevel inheritance.
11. Compile time polymorphism and runtime polymorphism
a)Compile time (Early binding / Static)polymorphism.
b)Run-time (Late binging /Dynamic) polymorphism.
Compile time polymorphism
Compile time polymorphism is achieved through Function overloading and operator overloading. In
function overloading ,function have same name but different arguments.
Run-time polymorphism
Run-time polymorphism is achieved through virtual functions. Here binding or linking of a function with
function definition is done during execution(run) time.
CHAPTER – 3 DATA STRUCTURES AND OPERATIONS
12. Static and dynamic data structures
In static dynamic memory allocation , the required memory is allocated before the execution of the
program and the memory space will be fixed. Data structures implemented using arrays are static.
In dynamic data structures memory is allocated during execution. Data structures implemented using
linked list are dynamic in nature.
HSE II Computer science[Type text]
Page 5
6
13. Application of stack
A stack is a linear data structure in which insertion and deletion takes place at one end called Top.It
follows LIFO(LastInFirstOut)principle.
The following are the applications of a stack
14.
Decimal to binary conversion.
Reversing a string.
Infix to postfix conversion.
Push and pop operation-algorithm
Push
POP
If (top < N) then
If top>=-1 then
Top = top+1;
Stack[top]= item
Else
Item = stack[top]
Top = top-1
Else
Print” stack overflow”
endif
Print “stack underflow”
endif
15. Application of queue
A Queue is a linear data structure in which insertion takesplace at one end(Rear end) and deletion
takes place at other end(Front end).It follows FIFO(FirstInFirstOut) principle.The elements are
processed in the order in which they are received. Note:The number of elements in a queue is called
Length of the queue.
The operations that can be performed on a Queue are,
a) Insertion operation (ENQUEUE).
The insertion operation adds a new element adds a new element at the rear end of the queue.
b) Deletion operation (DEQUEUE).
The deletion operation removes an element from the front end of the queue. An attempt to delete an
element from an empty queue is called queue underflow. Queue overflow results from trying to add an
element onto a full queue.
Applications of Queue
Job Scheduling.
Resource scheduling.
Handling of interrupts in real-time systems.
HSE II Computer science[Type text]
Page 6
7
16. Advantages of circular queue over linear queue.
A circular queue allows to store elements without shifting any data within the queue.The main advantage
of circular queue is that we can utilize the space of queue fully.It allows to store data without shifting any
data in the queue.
17. Linked list merits over array
A linked list is a collection of data item(nodes).Each node consists of data and a link(pointer) to the next
node.
The last node in a linked list has a Null,which marks the end of the list Linked list can be implemented in
two ways, both as stack and queue ie,
using array (static linked list)
using self-referential structures(Dynamic linked list)
Difference between Array and Linked list
The following are the difference between array and linked list
The size of array is fixed whereas a linked list can grow or shrink.
Array elements are accessed randomly. Linked list elements are accessed sequentially.
CHAPTER -4 WEBTECHNOLOGY
18. Explain client server communication
Communication on the internet can be classified into two,Client to server and server to
server.Authentication and security are essential for communication.Authentication is the process of
identifying a computer(server).Security prevents loss of data.
Client to Server communication
Client to Server communication does not require authentication,but certain applications like e-mail,ebanking etc requires user name and password.These communications are done in a secure manner.In
such situation HTTPS(Hyper Text Transfer Protocol Secure) is used.It works using SSL(Secure Socket
Layer) which ensures security.When a request is send by browser the server returns SSL certificate .It is
then verified by browser,and it then starts communication.This communication takes place in encrypted
form.
Server to Server communication
Server to Server communication takes place in e-commerce(online shopping).In such communication
confidential informations are send and received.A payment gateway act as a bridge between server and
bank server.
HSE II Computer science[Type text]
Page 7
8
19. Dns server
DNS Server used to resolve(Convert) domain name into IP. The process of translating domain name to
IP address is called name resolution. The internet contains thousands of interconnected DNS servers.
When you type a URL in your browser ,the browser contacts the DNS server to find IP address. The DNS
database is arranged in a hierarchical manner.
The different steps used in resolving the IP address by DNS are as folows
1)The browser first searches the local memory for the corresponding IP address.
2)If it is not found it searh the systems cache.
3)If it si not found it searches the DNS searver of local ISP
4)It seaches from root till it find’s the IP address.
5)The ISP returns the IP address to the browser.
6)The browser connects using the IP address if not it displays error message.
20. Text formatting tags in html
The text formatting tag is used to format text in a web page. The important text formatting tags are
bold, italics and underline etc.
<B> tag:-This tag displays the content in bold face.
<I>tag:-This tag displays the content in italics.
<U>:-This tag underlines the content.
<S> and <STRIKE> Tag
The <BIG> tag is used to increase the size of text.
<SMALL> Tag
The <SMALL> tag decreses the size of the text.
<STRONG> Tag
The <STRONG> tag will display text with strong emphasis(usually appears as bold).
<EM> Tag
The <EM> tag displays the enclosed text with emphasis(italics text).
<SUB> and <SUP> Tags
The <SUB> tag defines the subscript and <SUP> tag defines the superscript.
<BLOCKQUOTE> and <Q> Tag
HSE II Computer science[Type text]
Page 8
9
The <blockquote> tag is used for indicating long quotations(ie, quotation that span multiple lines).The
<Q> tag is used to quote the text.
<PRE> Tag
The <PRE> tag defines preformatted text ie,it displays text in exactly the characters and line spacing
written in the source document.
<ADDRESS> tag
The <ADDRESS> tag defines the contact information for the author/owner of a document(article).The
information may include name,phone numner,e-mail address etc.
<MARQUEE> Tag
The <MARQUEE> tag defines the text that scrolls across the user’s display.
Attributes of <MARQUEE> tag
The important attributes of <MARQUEE> tag are,
1)Height and Width:-It determines the size of marquee area.
2)Hspace and Vspace:-It defines the space between marquee and the surrounding text.
3)Scrollamount and Scrolldelay:-These attributes control the speed and smoothness of scrolling marquee.
4)Behaviour:-It defines the type of scrolling.It has three values scroll,slide and alternate.
5)Loop:-It specifies how many times the marquee text must scroll.The default value is endless.
6)Direction:-It specifies the direction of scroll.
<DIV> Tag
The <DIV> tag defines a division or a section in an HTML document.
Attributes of <DIV> tag
21. What are the special characters in html
< returns <(lessthan symbol)
> returns >(greater than symbol)
& returns & symbol
22. Comments in html
Comments helps to understand code and increases readability of the code.Comments in HTML are placed
between <!- - and - ->.
HSE II Computer science[Type text]
Page 9
10
23. Attributes of IMG tag
The <IMG> tag is used to insert image in a web page.
Attributes of <IMG> tag are,
1) Src:-It specifies the name of image.
2) Align:-It controls alignment of the image(TOP,MIDDLE or BOTTOM).
3) Width:-It specifies the width of the image.
4) Height:-It specifies the height of the image.
5) Alt:-It defines the text to be displayed if the browser cannot display the image.
6) Vspace and Hspace:-Controls the vertical and horizontal spacing between images in the web page.
24. What is Ajax
AJAX stands for Asynchronous JavaScript and XML. It is a technology used to update parts of web
pages without reloading the whole page. It is used to create dynamic and interactive web applications.
For example Google Map is based on AJAX technology. AJAX mainly consists of two languages Java
Script and XML.
25. What is CSS
CSS is a style sheet language used for describing the appearance of document wiitten in markup
language such as HTML. It can be used to control the colour of text, style of font etc. The advantages
of CSS are
Easy to read and maintain code.
Ability to change appearance by changing a single file.
Greater control over web elements.
26. Container tags and empty tags
Tags in HTML are of two types, Empty tag and Container tags Empty tag: An empty tag is also known
as single.tag .For example <p>,<hr> etc.
Container tags: Container tags are also known as paired tags. For example,<u> </u>,<body> </body> etc.
They always appears as pairs.
CHAPTER -5 ADVANCED –HTML
27. Various type of lists in html
Lists in HTML are used to display list of information.There are three types of lists in HTML,Ordered
list,Unordered list and definition list.
Ordered list
An ordered list marks items by numbers or alphabets.It is created using the <OL> and </OL> tag.It is
also called numbered list.
HSE II Computer science[Type text]
Page 10
11
Example:
<OL>
<LI>INDIA</LI>
<LI>SRILANKA</LI>
<LI>NEPAL</NEPAL>
<LI>CHINA</LI>
</OL>
Output:
Unordered List
An unordered list used bullets instead of numbers.The <UL> and </UL> tag is used to create an unordered
list in HTML.
Example:
<UL>
<LI>INDIA</LI>
<LI>SRILANKA</LI>
<LI>NEPAL</NEPAL>
<LI>CHINA</LI>
</UL>
Unordered List
An unordered list used bullets instead of numbers.The <UL> and </UL> tag is used to create an unordered
list in HTML.
<UL>
<LI>INDIA</LI>
<LI>SRILANKA</LI>
<LI>NEPAL</NEPAL>
<LI>CHINA</LI>
</UL>
Definition list consists of a list of definitions and their descriptions.The <DL> and </DL> tag is used to
create a definition list in HTML.The definition term is specified by <DT> and description by <DD>.
28. Internal and external links
Linking is an important feature of HTML.Clicking a link transfers the control to onother document or
web page.Links in HTML are of two types,Internal link and External link.The <A> tag is used to create
a link in HTML.
Internal link
An internal link is a link which points to the different section of the same document.
HSE II Computer science[Type text]
Page 11
12
External link
An external link points to another document or web page.
<A href =”address.html”> click here to see address</A>
E-Mail link
A link to an e-mail can be created using the <A Href> tag. The syntax is
<A Href=”mailto:email address”> Message ub the browser </A>
Example:
<A Href=”mailto:[email protected]>Send your Comments </A>
29. Use of embed tag and their attributes
The <EMBED> tag is used to embed sound and video in a web page.The main attribute of <EMBED>
tag is Src which specifies the file name (URL) of sound or video to be included.The Hidden attribute
of <EMBED> tag is used to control visibility of embedded components.It has two values True (Default)
or False.
30. Distinguish <TH> and <TD>
<TD> Tag
The <TD> tag is used to specify the table data.
<TH> Tag
The <TH> tag is used to specify the table heading.
Difference between <TH> and <TD> tag
The contents created using <TH> tag appears bold and as centered where as the content created using
<TD> tag does not appears as bold and centered. The <TH> tag is used to specify the table heading whereas
<TD> tag is used to specify the table data.
31. Use of frameset in html
The <FRAMESET> tag allows to view multiple web pages in a single window. Each individual
sections(Pages)in a frameset is called frame. It is a container tab which begins with <FRAMESET> and
</FRAMESET> tags.
Attributes of <FRAMESET> Tag
1)Cols:-It determines the dimension and number of vertical frames in the frameset.
2)Rows:-It determines the dimension and number of horizontal frames in the frameset.
3)Border:-It specifies the thickness of border.
4)Bordercolor:-It specify border colour.
HSE II Computer science[Type text]
Page 12
13
32. Use of NOFRAME tag
The <NOFRAME> tag specifies the content if the frames cannot be displayed by the web browser.
33. Form and their attributes
Forms are used to pass information from web page to web server. A form has two elements, container and
controls(textarea, buttons, checkboxes etc). Forms in HTML are created by the <FORM> and </FORM> tag.
Attributes of <FORM> tag
1)Action:-It specifies the location(URL) of the server.
2)Method:-Indicates the method used by the web server to receive the form.The two possible values are
POST and GET(Default).
3)Target:-It specifies the frame where the result is to be displayed.
CHAPTER -6 JAVA SCRIPTS
34. Difference between client scripting and server scripting.
Client side scripts
Server side scripts
They are executed by the browser(Client).
They are executed by the web server.
Used for validating user inputs.
Used for processing data.
They are used to create static web pages.
They are used to create dynamic web
pages
Depends on browser type.
Does not depend on browser.
35. Attributes of script tag
The <SCRIPT> tag is used to include(embed) script in an HTML page. The Language attribute of
<SCRIPT> tag specifies the type of scripting language used.
Example:
<SCRIPT Language=”JavaScript”>
</SCRIPT>
36. Data types in java scripts
Data type specifies the type of data and the operations that can be performed on the data.data types in
JavaScript is classiffied into two primitive data type and compositive data type.
Primitive data types
The three primitive data types in JavaScript are Number, String and Boolean.
Number:-They include integers and floating point numbers.
HSE II Computer science[Type text]
Page 13
14
Strings:-A string is a combination of characters, numbers or symbols enclosed within double quotes.
Boolean:-A Boolean data can be either True or False.
37. While and do-while difference in java
The while loop executes a group of statements repeatedly based on a condition.The syntax is
while(expression)
{
statements;
}
The do-while loop also execute group of statements based on a given condition. In this case loop body is
executed at least once.
Syntax
Do
{
Loop body;
}while(condition);
38. Write a java script statement to access a value in a text box to a variable.
Function cube()
{
Var n,result;
N= document.frmx.txty.value;
Result = n*n*n;
Document.write(result);
}
39. Use of events in java scripts
<input type = “submit” value = “cube” onclick = “cube()”>
Here onclick is event in java script, it tells the program execute cube() while click on the button.
Other events available in java scripts are
40. Methods of writing java scripts in html documents.
41. Use of typeof operator in javascript
The typeof operator is used to find the type of a javascript variable. It returns a string
indicating the data type of its operand.
Example:typeof”Hello” //returns String
typeof 3.14 //returns Number
HSE II Computer science[Type text]
Page 14
15
42. What are the built-in functions in java script
Built-in functions are also called methods.The following are the important methods in JavaScript.
1) alert( ) function
The alert( ) function is used to display a message on the screen.The syntax is
alert(“message”);
2) isNaN( ) function
The isNaN( ) function is check if a value is a number or not.The function returns True if the value is a
number.The syntax is
isNaN(test_value);
3) toUpperCase ( ) function
This function converts a string into uppercase.
4) toLowerCase( ) function
This function converts a string to lowercase.
5) charAt( ) function
The charAt() method returns the character at the specified index in a string. The index of the first
character is 0, the second character is 1, and so on.
Example:var str = "HELLO WORLD";
var res = str.charAt(0);
returns H
6) length Property
The length property returns the length of a string(number of characters).
Example:var a=”Welcome”;
var len=a.length;
document.write(len);
Output:7
HSE II Computer science[Type text]
Page 15
16
The Number( ) function is used to convert a string data into a number.
Example:
Number(“42”); //returns 42
43. Advantages of placing java scripts in head section of html document.
CHAPTER -7 WEBHOSTING
44. Types of webhosting
The type of web hosting is decided by amount of space needed for hosting, number of visitors to
website,database and programming language support etc.Web hosts provide different types of hosting
packages.
Web hosting is classified into three types
a) Shared hosting,
b) virtual hosting
c) dedicated hosting.
a)Shared hosting:- It is the common type of web hostingIt is called shared because many websites
reside on one web server connected to the Internet. They share resources(RAM,CPU etc).Shared
hosting is not suitable for websites with high
band width, large storage space etc. It is not suitable for small sites with less traffic. Shared servers are
cheaper and easy to use. Updates and security issues are handled by the hosting company. The main
dis-advantage of shared hosting is that other sites will slow down if any one of the site has heavy
traffic as bandwidth is shared by many sites.
b)Dedicated hosting:-In dedicated hosting a web site uses(lease) an entire server and
its resources.The web server is not shared with other servers. It is mostly used by websites that receive
a large volume of traffic.The web sites of large organizations,government departments etc use
dedicated web hosting. The advantage of dedicated web hosting is that servers are hosted in data
center which has internet connection,uninterrupted power supply etc.
Colocation is a form of dedicated hosting in which the client can use their own server and other
facilities are provided by service provider.
c)Virtual Private Server:-A virtual Private Server(VPS) is a physical server that is
virtually partationed into several servers.Each VPS works like a dedicated server and has its own operating
system,software etc.Each VPS works as an independent server. The user of VPS can install and configure
any type of softwares.VPS is also called virtual
dedicated server (VDS).This type of hosting is suitable for websites that requires more
features at less expense.Some popular virtualization softwares are Vmware,Free
VPS,Virtualbox,Microsoft Hyper-V etc.
45. How does a website created. Explain the essential steps
HSE II Computer science[Type text]
Page 16
17
46. What is CMS
A content management system is a web application which allows creating, publishing,
editing and modifying web sites..It provides templates for designing web sites. CMSs are
often used in blogs, shopping sites. The content management system (CMS) has two elements Content
management application (CMA) and Content display application
(CDA) .The main advantage of CMS is nontechnical people can manage the contents of
web sites. Also people who has no knowledge of web programming can create dynamic
web sites. Joomla and Wordpress are examples of content management systems.
Advantages of Content Management Systems are,
1.Non-technical people can easily create and manage web sites.
2.It is easy to maintain CMS based sites.
3.Design changes are simple.
47. Use of FTP client
An FTP client software is used to transfer files of a web site to a web server.FTP client
establishes a connection with a remote server to transfer files. It needs a user name and
password. Now a days SSH FTP(SFTP) protocol is used to send user name and password
in an encrypted form. It uses SSH protocol. Once the client is authenticated the client
canupload files. Some of the popular FTP clients are File Zilla, Cute FTP, Smart FTP ..etc.
48. What is meant by responsive design
Responsive web design is an approach to web design aimed at providing an optimal
viewing and interactive experience. Itmakes your web page look good on all devices
(desktops, tablets, and phones).The term ‘Responsive Web Designing’ was coined by
Ethan Marcotee. Responsive web designing uses flexible images, videos, layouts etc..
CHAPTER -8
49. What is a database and dbms
A database is a collection of data. A DBMS(Data Base Management System) is a set of programs used to
create, access and maintain a database.
50. Advantages of dbms
DBMS has the following advantages
1)Data Redundancy :-Duplication of data is called data redundancy..A DBMS keeps data at one place and
all users and applications access the centrally maintained database.
2)Data consistency:-Data redundancy leads to inconsistency. An inconsistent database provides incorrect
data. Inconsistency can be controlled by controlling data redundancy.
3)Efficient data access:-A DBMS provides an efficient access to database.
4)Data integrity:-Data integrity refers to correctness of data stored in the database. Data integrity is
maintained through implementing integrity checks
5)Data Security:-Data security refers to protecting data against accidental lose or disclosure. Data security
can be done by using passwords.
6)Sharing of data:-The data stored in the database can be shared among multiple programs and users.
HSE II Computer science[Type text]
Page 17
18
7)Enforces standard:-Tha database enforces standard.These standards may be laid by the organization or
individual who uses data.
8)Recovery:-A DBMS provides a mechanism for data backup and recovery from hardware failure.
51. Components of dbms
SQL consists of three components Data Definition Language (DDL),Data Manipulation
Language(DML) and Data Control Language(DCL).
1.
Data Definition Language(DDL)
DDL is a component of SQL used to specify the schema(Structure) of a database. DDL
commands are used to create,modify and remove database objects like tables, views. The commonly used
DDL commands are CREATE, ALTER and DROP.
2.
Data Manipulation Language(DML)
DML is a component of SQL used to interact with database. It enables to insert,delete and retrieve data
from a database. The commonly used DML commands are SELECT, INSERT, UPDATE and DELETE.
3.
Data Control Language(DCL)
DCL is used to control access to database. It is used to control administrative privileges
In a database. The commonly used DCL commands are GRANT,COMMIT and REVOKE.
52. What is meant by data abstraction, explain 3 levels of dbms
Database Abstraction
The major purpose of database is to provide an abstract view of data.ie, the system hides details of how
data is stored and maintained. A database system is designed using three levels of abstraction, Physical
Level, Logical Level, View Level.
1)Physical Level(Internal Level):-It is the lowest level of abstraction. It describes how data is actually
stored in the storage medium.
2)Logical Level(Conceptual Level):-Logical level describes what data are stored in the database and the
relationship between data.It is also called global view and represents the entire database.It is used by
database administrator.
HSE II Computer science[Type text]
Page 18
19
3)View Level(External Level):-This is the highest level of database abstraction and is near to the users.It is
concerned with the way in which individual users view the data.It describes only a part of entire database.
53. What is meant by data independence, what are the two type of data independence.
Ability of dbms to modify one level without affecting next scheme level is known as data independence,
there are two type of data independence.
1.
Physical data independence
Ability of dbms to modify physical level without affecting logical level is known as physical data
independence
2. Logical data independence
Ability of dbms to modify logical level without affecting next higher level ie view level is known
as logical data independence.
54. Users of dbms
DBMS users are classified into four
1.
2.
3.
4.
Database Administrator(DBA)
Application Programmer
Sophisticated Users
Naive Users
1.Database Administrator(DBA)
A database administrator is a person who has central control over the database. He is responsible for the
installation, configuration, upgrading, administration, monitoring, maintenance, and security of databases
in an organization.
2.Application Programmer:-Application programmers are computer professionals who interacts with the
database through application programs written in any languages such as C,C++,Java etc.
3.Sophisticated Users:-Sophisticated users interact with database through queries. They include engineers,
analyst etc.
4.Naive users:-Naive users are unsophisticated users .They interact with database by invoking previously
written application programs. They are not aware of details of DBMS.
27 What is keys
A key is an attribute or collection of attributes that uniquelly identifies each record(Tuple) in a table. A
key consisting of one or more attributes is called a composite key
1)
Candidate Key:- A candidate key is a column or set of columns that uniquely identifies each
record in the table.A table may contain more than one candidate key.For example RollNo + Mark can be
considered as a candidate key in the Student table.
2)
Primary Key:-A primary key is a candidate key which is used to uniquely identify each row in a
table.A table can have only one primary key.
3)
Alternate Key:- An alternatekey is a candidate key that is not the primary key.
HSE II Computer science[Type text]
Page 19
20
4)
Foreign Key:- A foreign key is a field in one table that must match a primary key value in another
table.It is used to join two tables together.It is also called reference key.
5)Super Key:-A Super key is a set of one or more columns in a table for which no two rows can have the
same value. For Example Name and Address can form a Super Key in the Students table.
28 Explain relational operation
Relational Algebra
Relational algebra consists of a set of operations that take one or more relations as input and produce a
new relation as output.The fundamental operations in relational algebra are Select, Project, Union,
Cartesian Product etc
1.
SELECT Operation
The SELECT operation selects rows from a table that satisfies a specific condition. It is denoted by
Sigma(σ ).The select operation gives horizontal subset of a relation.
2.
PROJECT Operation
The PROJECT operation selects attributes (Columns) from a table .It is denoted by Pi The PROJECT
operation gives vertical subset of a relation.
3.
Cartesian Product Operation
The Cartesian product operation combines tuples from two relations. It is a binary operation and is
denoted by X(cross).It is also called cross product.
4.
UNION Operation
The UNION operation retains a relation consisting of all tuples from both the relations. It is denoted by U
.The UNION operation takes place between two relations having tables having same number and types of
attributes.
5.
INTERSECTION Operation
The INTERSECTION operation returns a relation consisting of all tuples common to both the relations. It
is a binary operation denoted by ∩.
6.
SET DIFFERENCE Operation
The SET DIFFERENCE operation returns a relation consisting of all tuples appearing in the first relation
and not in the second relation. It is denoted by –
CHAPTER -9
29 Ddl commands and dml commands
30 Features of sql
31 Data types in sql
Data type specifies the type of value that can be entered in a column in a table.It
ensures the correctness of data. Data types in SQL are classified into three ,
HSE II Computer science[Type text]
Page 20
21
1.
2.
3.
Numeric data type,
String data type ,
Date and time data type.
Numeric data type
INT(INTEGERS) data type
Integers are are whole numbers ie, without fractional part. They can be positive, negative or zero. Eg
rollno integer;
DEC (DECIMAL) data type
The DEC data type represents fractional numbers.
syntax
decimal amount(8,2); where 8 is the total number of digits and 2 is the number of
digits after the decimal point.
String data types
A string is a group of characters. The two comonly used string data types in MYSQL
are CHAR(CHARACTER) and VARCHAR.
1) CHAR(CHARACTER) data type
Character includes letters, digits, special symbols etc. It is a fixed length data type.
Name char(20);
2) VARCHAR data type
The VARCHAR data type reprsent variable length strings. It is similar to CHAR data
type but only allocates memory according to the size of the string. It saves memory
spaces.
Date and Time data type
The date data type is used for storing date and time data type is used for storing time.
1) Date data type:-The date data type is used for storing date. The date in MySQL is
represented in YYY-MM-DD format(Standard format).
2.
Time data type:-The time data type is used for storing time. The format is
HH:MM:SS.
32 Column constraints
A constraint is a condition applied to a column or group of columns. Constraints are
classified into Table Constraints and Column Constraints. A table constraint is applied to a table where as
a column constraint is applied to a column. Constraints ensure the database integrity hence they are also
called database integrity constraints.
Column constraints
1)NOT NULL:-This constraint ensures that a column can never have NULL(empty)
values.
2 )UNIQUE:-This constraint ensures that no two rows have the same value in a
HSE II Computer science[Type text]
Page 21
22
specified column.
4)DEFAULT:-This constraint is used to specify a default value for a column.
Table Constraints
A table constraint is applied to a table .It usually appears at the end of table
definition. The important table constraints are PRIMARY Key and CHECK
PRIMARY KEY:-It declares a column as the primary key of a table. The primary key
cannot contain NULL value ie , this constraint must be applied on to a column
defined as NOT NULL.
CHECK:-This constraint limits the values that can be inserted into a column of a
table.
33 Concepts of view
A view is a virtual table which is derived from an existing table(Base table). The CREATE VIEW
Command is used to create a VIEW .
The Syntax is
CREATE VIEW <View_Name> AS SELECT <ColumnName1> [,<ColumnName2>,...... ]
FROM <TableName> [Where <Condition> ] ;
Example:CREATE VIEW Student1 AS SELECT * FROM STUDENT Where Course=’Science ‘ ;
The DROP VIEW Command can be used to remove view
Advantages of View are
Views allows to setup different security levels for a table.
Views allows to see the same data in a different way.
It helps to hide complexity.
34 Where and having
The WHERE clause is used to select rows or columns from a table which satisfy a
specific condition. Eg : Select * from student where total>200
Having clause is used with Group by command. This will apply some conditions with group by. Eg
select batch, count(*)
from student
group by batch having total >50.
35 Distinct and unique
The Keyword DISTINCT is used to avoid duplicate rows from the result of a select
Unique is a column constraint to avoid duplications in a specified column.
36 Aggregate functions
The aggregate functions acts on a group of data and returns a single data. They are
also called summary functions. Commonly used aggregate functions
AVG() - Returns the average value
COUNT() - Returns the number of rows
HSE II Computer science[Type text]
Page 22
23
FIRST() - Returns the first value
LAST() - Returns the last value
MAX() - Returns the largest value
MIN() - Returns the smallest value
SUM() - Returns the sum
Note:- Except for COUNT, aggregate functions ignore null values.
CHAPTER 10 SCRIPT USING PHP
37 Benefits of php
PHP is a server side scripting language used to create dynamic web pages.PHP stands for Hypertext
Preprocessor.It is an interpreted language.It is embedded in HTML.It is an open source
language.Rasmus Lerdorf is called the father of PHP.PHP supports different databases hence large –
scale websites are developed using PHP.
The code is executed on the server hence it is more secure.
Easy to learn.
It is free to use .
It executes faster than other scripting languages.
It supports different databases.
It works on different platforms such as Windows,Linux,UNIX etc.
It offers many levels of security.
38 How to setup php in a computer
1) Setting up the environment
To run PHP a web development environment is needed. This needs a PHP compatible web server and
interpreter Packages like WAMP,LAMP,XAMPP etc can be used which includes a web server.
2) Writing the code and running the script
PHP scripts are mearly plain text. A PHP script begins with <?PHP and ends with ?> The PHP code is
saved with extension .PHP and is saved in the root directory of web server.
3) Embedding HTML and PHP
PHP codes are embedded in HTML document using the <?PHP and ?> tags.
39 Variable naming conventions in php
Every variable in PHP begins with $ sign,followed by its name.In PHP variables does not need to be
declared before using it.PHP automatically determine the data type
depending on the type of value assigned to it.
Rules for naming variables in PHP
A variable name starts with the $ sign, followed by the name of the variable
A variable name must start with a letter or the underscore character
A variable name cannot start with a number
A variable name can only contain alpha-numeric characters and underscores (A-z,
0-9, and _ )
HSE II Computer science[Type text]
Page 23
24
Variable names are case-sensitive ($age and $AGE are two different variables).
Special characters(Spaces,Periods,Commas,Question Mark etc) are not allowed in
variable names
40 Data types of php
The core data type includes integers,float,boolean and string data types.
Integers
An integer is a whole number ie,number without fractional part(including negative
numbers).
Example:--24,58,64 etc.
Float
Floating point numbers are represented by float or double data type.
Example:-12.56,24 E4 etc.
String
A string is a group of characters.They are enclosed between Single or Double quotation
mark.
Example: “Hello”,’Hai’.
Boolean
The boolean data type represent TRUE(1) or FALSE(0) values.
Special data types
Special data type includes NULL,Array,Objects and Resource.
NULL
The NULL data type represents NULL values.It is used for emptying variables.
Array
An array holds multiple values.There are three types of array in PHP,indexed
array,associative array and multidimensional array.
Object
An object is a collection of both data and function.An object is an instance of a
class.Objects are created using the ‘new’ Keyword.
Resources
Resources are special varables that holds external resources like file handler,database
objects etc.They are created using specific functions.
41 Operators in php
An operator is a symbol which performs a specific task. The important operators in PHP
are
1)Assignment Operator
The assignment operator(=) is used to assign a value to a variable.
Example:- $a=10; //Assigns the value 10 to the variable a.
$p=$a; //Assigns the value in the variable a to variable p.
2)Relational Operators
The relational operators are used for comparison.They include
Operator Meaning
= = Equal to
! = Not Equal to
< Less Than
> Greater Than
< = Less than or equal to
HSE II Computer science[Type text]
Page 24
25
> = Greater than or equal to
3)Logical Operators
The logical operators are used to combine conditional statements.They include
4)Arithmetic Operator
Arithmetic operators are used to perform arithmetic operations.They include
5)String Operators
The two types of string operators are concatenation operator(‘.) and concatenation
assignment operator(‘. =’).The concatenation operator joins two strings together while
the concatenation assignment operator adds the arguments on the right side with
arguments on the left side of assignment operator.
6)Combined Operator
The combined operator includes, + =,- =,* =,/ =,% = and . =.
Increment and Decrement Operator
The increment operator increments the value by 1 and decrement operator decrements
the value by 1.There are two forms of increment and decrement operator,Prefix and
postfix form.
42 Control structures in php
Control structures are used to alter the normal sequence of execution of a program.The
control structures in PHP are classified into two types Conditional statements and
Looping statements.
The syntax of if statement is
if(condition/expression)
{
Statements;
}
Note:-The statements are executed only when the condition becomes True.
43 Advantages of associative array over indexed array
An array in PHP is a collection of key and values.It maps(associates) values to key.The
keys are used to identify values and values stores data.
Indexed array
An array with numeric index is called indexed array.They can store numbers,strings
etc.By default the index starts at zero.The function array( ) is used to create an array.
There are two ways to create an array
$array_name=array(value1,value2,value3,.... etc);
Or
$array[key]=value;
Example;
$rollno=array(110,1102,1106,1109);
$colors=array(“Red”,”Green”,”Blue”);
Associative arrays
Arrays with named keys are called associative array.They have index as string. This type
of array is also referred to as a hash or map. An associative array assigns names to
positions in the array.
HSE II Computer science[Type text]
Page 25
26
Different ways to create associative array
There are two ways to create an associative array:
$age = array("Peter"=>"35", "Ben"=>"37", "Joe"=>"43");
or
$age['Peter'] = "35";
$age['Ben'] = "37";
$age['Joe'] = "43";
Foreach loops
44 Explain the use of foreach loop
The foreach loop works only on arrays, and is used to loop through each key/value pair
in an array.The syntax is
foreach ($array as $value)
{
code to be executed;
}
Example:<?php
$colors = array("red", "green", "blue", "yellow");
foreach ($colors as $value) {
echo "$value <br>";
}
?>
Functions in php
A user defined function starts with function keyword.The synatx for declaring a function is
function functionName()
{
Code to be executed;
}
45 Three tier architecture
Three tier architecture is a client-server achitecture.The functionalities(user
interface,application programs,data storage etc) are separated into layers called
tiers.Each tier is located separately on a computer.The three tiers in web application
development are, Client,Web server and Database.
Tier 1:-It is the front end where the content is rendered by the browser.
Tier 2:-It accepts requests,runs the script and sends the output to the browser.
HSE II Computer science[Type text]
Page 26
27
Tier 3:-It is the backend(Database or data store).It interprets and executes SQL
commands.
46 Php super globals
Several predefined variables in PHP are "superglobals", which means that they are
always accessible, regardless of scope - and you can access them from any function, class
or file without having to do anything special. The PHP superglobal variables are:
$GLOBALS
$_SERVER
$_REQUEST
$_POST
$_GET
$_FILES
$_ENV
$_COOKIE
$_SESSION
47 Difference between java script and php
48 Difference between get and post methods
Information sent from a form with the GET method is visible to everyone (all variable
names and values are displayed in the URL). GET also has limits on the amount of
information to send. Information sent from a form with the POST method is invisible to
others (all names/values are embedded within the body of the HTTP request) and has no
limits on the amount of information to send.
77.
GET method
It can be cached
It remain in the browser history
It can be bookmarked when dealing
with sensitive data
It has Length restriction
It can be bookmarked
78
POST method
It cannot be cached
It does not remain in the browser history
It can be used to sent sensitive data.
It has no length restriction
It cannot be bookmarked
Steps to connect php with mysql
Connecting PHP to MySQL is done in four steps
1) Open a connection to MySQL.
we use myysql_connect ( ) function to open a connection to MySQL database.
2) Specify the database to open.
The mysql_select_db ( ) function is used to select a particular database.
3) Retrieve or insert data to/from database.
79
Data is read from database in two steps.
a)Execute the SQL query on database using mysql_query( ) .It is used to execute SQL query on a database
b)Populate row to array using mysql_fetch_array( ). This function populate rows of a data as an array.
4)
Close the connection.
The mysql_close ( ) function is used to close a connection to the database server.
HSE II Computer science[Type text]
Page 27
28
CHAPTER 11 – ADVANCES IN COMPUTING
80.
Explain the features of distributed system
Distributed computing is the method of processing in which different parts of a program are run
simultaneously on two or more computers that are communicating with each other over a network.
Various distributed computing paradigms are
•
Parallel computing
•
Grid computing
•
Cluster computing
•
Cloud computing
The advantages of distributed computing are
•
Economical : Distributed computing reduces overall cost
•
Speed : As computational load is spread across various nodes speed of execution increases.
•
Reliability: distributed systems can function even if one of its node fails
•
Scalability: The number of nodes can be increased or decreased as and when the need arises.
Disadvantages are
•
Complex: Additional programming required to set up distributed systems
•
Security: Information passed around the network may be tracked and used for illegal purposes
•
Network dependency : In case of network failure, the entire system becomes unstable.
81. Compare parallel and serial computing
Parallel computing is a form of computation in which many calculations are carried out simultaneously. .
In parallel computing there will be many processors that share a common memory.
Serial computing is the conventional computing method where a single processor executes instructions
one by one.
Difference between parallel and serial computing
Serial Computing
A single processor is used
Aproblem is broken into a series of instructions
Instructions are executed sequentially
Parallel Computing
Multiple processors are used with a shared memory
A problem is divided into modules that can be
solved concurrently.
Instructions from each module executes
HSE II Computer science[Type text]
Page 28
29
simultaneously in different processors.
82 Advantages of cluster computing
Clusters are a group of personal computers , storage devices etc. linked together through LAN so as to
work like a powerful single computer. It provides low cost parallel processing and ensures fault tolerance,
ie ensures computational power is always available.
Linux is the common Operating System and it is used in high database applications, e-Commerce etc.
Fault diagnosis is a major issue.
83 Advantages of cloud computing
Cloud computing is a computing model where resources such as computing power, storage , software etc
are provided as services on the internet that can be accessed remotely. Eg. Web based email accounts.
Advantages of cloud computing
•
Cost saving: Companies can reduce capital and operational expenditures.
•
Flexibility: Flexibility of cloud computing allows usage of extra resources at peak times to meet
user demands.
•
Ease of maintenance: Cloud service providers do the system maintenance, thereby reducing
maintenance requirements.
•
Mobility: As the system are accessible from anywhere, it provides better productivity.
Disadvantages
•
Security and Privacy : Data or program sent over shared and publicly accessible systems, it is
prone to stealing or corrupting.
•
Lack of standards: Since clouds have no standards they are not inter-operable
84 Draw and explain knowledge pyramid
Artificial intelligence is one of the latest disciplines in computer science, first definition of AI was
established in 1950 by Alan Turing. His studies resulted in one of the first publication of AI, entitled
Intelligence Machinary. AI currently encompasses a huge variety of subfields such as playing chess,
proving mathematical theorems, computer vision, natural language processing, medical diagnosis etc.
Turing strongly believed that a well designed computers could do everything that a brain could.
HSE II Computer science[Type text]
Page 29
30
By using this model we can simulate AI in computers to make system intelligence.
Data :- data is termed as a collection of raw materials.
Information :- Processed data is known as information.
Knowledge :- it is the organized information, it can be a piece of information that helps in decision
making.
Intelligence :- the ability to draw useful inferences from available knowledge is generally referred as
intelligence.
Wisdom :- it is the maturity of mind that directs its intelligence to achieve desirable goals.
85 Define cybernetics
86 What is ANN
Artificial Neural Networks( ANN) : ANN models biological neural systems in brain that performs
complex, nonlinear and parallel computing.
87 Explain swarm intelligence
Swarm Intelligence: SI is the simulation of collective behavior of decentralized, self organized
systems, natural or artificial. It helps in understanding the natural systems like ant colonies, bird
flocking, bacterial growth, fish schooling etc.
88 Explain fuzzy system
Fuzzy Systems: A fuzzy system is a control system based on fuzzy logic—a mathematical system that
analyzes analog input values in terms of logical variables. Fuzzy logic allows reasoning with uncertain
facts to infer new facts. Thus fuzzy logic allow the modeling of common sense. Fuzzy systems are used
in automotives to control gear transmission, in home appliances, controlling traffic signals etc.
89 Various applications of computational intelligence
Artificial Neural Networks( ANN)
Evolutionary Computation
HSE II Computer science[Type text]
Page 30
31
Swarm Intelligence: SI
Fuzzy Systems
90 What is soft computing
91 Significance of turing test.
The first definition of artificial intelligence was established by Alen Turing. Turing defines intelligent
behavior as the ability to achieve human-level performance in all cognitive tasks, sufficient to fool an
interrogator.Turing Test is the ultimate test to be passed by a machine to be called intelligent.
•
To pass Turing test ,a system must possess capabilities such as
•
•
•
•
Artificial Neural Networks( ANN)
Evolutionary Computation
Swarm Intelligence: SI
Fuzzy Systems
92 List the uses of biometrics
93 List the use of robotics
CHAPTER 12 ICT AND SOCIETY
94 What are various e-learning tools
Some of the e-Learning tools are as follows
a) Electronic Book Reader (e-Books)
Portable computer devices that are loaded with digital book content via communication interfaces are
called Electronic books reader or e-Books. · e-Book reader can store a lot of books in digital form.
b) e-Text
Textual information available in the electronic format is called e-Text. · e-Text can be read and
interacted with an electronic device like the computer, e-Book reader etc. e-Text can be converted into
various formats.
c)
Online chat
It is a real time exchange of text messages between two or more people over the internet. · Online
chatting can be in the text or in the visual mode. · It can be used even with low speed internet
connection. In virtual class environment, online chatting is used to discuss topics between the faculty
and the students
d) e-Content
· e-Contents, usually e-Learning materials, once prepared can be broadcasted through
television channels, webcasted or uploaded in websites. · Uploaded contents can be downloaded,
viewed and saved for future reference.
HSE II Computer science[Type text]
Page 31
32
e) Educational TV channels
Educational TV channels are those channels that are dedicated for e-Learning purposes. They
broadcast recorded classes on various subjects, interview with experts, lab experiments etc.
95 Advantages of e-learning
e-Learning has the ability to offer courses on variety of subjects to large number of students
cutting across geographical limitations.
e-Learning saves on cost and is a helpful to people with limited financial resources.
it provides facility to do online courses from various national and international reputed
institutions.
96 Advantages of e-governance
The major benefits in the implementation of e-governance are as follows
It leads to automation of government services, ensuring information is equally available to all
citizens
It ensures more transparency in the functioning of government offices and departments,
thereby eliminating corruption to a large extent.
It makes every government offices and departments responsible as they have to deliver the
services in a time bound manner.
It saves time and money for the citizens, as they would have had to visit the various
government offices and departments to get their work done.
97 Components of e-governance services
The e-Governance infrastructure mainly consists of
A. State Data Centre (SDC)
SDC’s provide operational and management control of e-governance of the government and minimize
the overall cost of data management, resource management, deployment etc. · The functions include
keeping of central data repository of the state, securing data storage, online delivery of services,
disaster recovery mechanism etc. · SDC’s combine services, applications and infrastructure to provide
efficient electronic delivery of G2G, G2C, G2B and G2E services at times through a common delivery
platform.
B. State Wide Area Network (SWAN)
SWAN is the core connectivity infrastructure of e-governance. · In Kerala it connects the three hubs –
Trivandrum, Kochi and Kozhikode to all the 14 districts and further linking these districts to all the
block panchayats· It also connects different departments and offices of the governments. · It supports
the integration of large number of G2G and G2C services with the applications received from the
SDC.
C. Common Service Centre (CDC)
CDC is the front end delivery points of e-governance to the public at large. It helps in providing
digital interface for making utility payments such as electricity, telephone and water bills. It provides
for submission of various online applications, besides generating and distributing certificates to the
needy· In Kerala, Akshaya centres work as the CDC’s
HSE II Computer science[Type text]
Page 32
33
98 Duties of akshaya centers
The services offered by Akshaya Centres include
e-grantz, e-filing, e-ticketing,
submission of online applications for ration card and electoral ID,
Aadhaar enrollment and Aadhaar based services
besides some of the insurance and banking services.
99 What are the major challenges in e-learning
Face to face contact between the teachers and students not possible
Proper interaction between the teachers and students are limited
Initial and subsequent investment required for equipments and technology
Hands on practical in real laboratory scenario are a constraint.
100 Services available in e-business.
e-Commerce
e-Business
Electronic Payment System (EPS)
e-Banking
101 Advantages and disadvantages of e-business
Advantages
It overcomes geographical limitations.
It reduces operational costs.
It minimizes travel time, thereby saving time and money.
It remains open 24 hours a day and 365 days a year
It provides lot of choices in buying a product both in terms of quality and cost.
Disadvantages
Low e-literacy
Consumers, especially in rural areas do not possess Electronic cards and net banking facility
If proper security measures are not undertaken by the users, they may compromise vital
information such as credit/ debit card number, PIN etc, and thereby lose money.
There is no “Touch and Feel” advantage
102 What is cyberspace
(Awareness is the best way to protect ourselves in cyberspace. Comment)
Cyber space is a virtual environment created by computer systems connected to the internet.
Internet is often referred to as a cyber space.
It is an information superhighway where individuals gather information, interact, exchange ideas,
provide social support, conduct business, play games etc
It represents a world where events or transactions occur that are not in real world
It is an uncontrolled and unregulated electronic space where anyone is free to do anything and
express themselves freely
HSE II Computer science[Type text]
Page 33
34
Due to the uncontrolled and unregulated space, cyberspace security has become a cause of
concern
103 Different types of cyber crimes
Cyber crime is defined as a criminal activity in which computers or computer networks are used as a
tool, target or a place of criminal activity. Cyber crimes mainly consists of unauthorized access to
computer systems, credit/debit card frauds, illegal downloading, phishing, hacking, denial of service
attacks etc. The cyber crime can be basically divided into three major categories
1.
Cyber crimes against individuals
i.
Identity theft
ii.
Harassment
iii.
Impersonation and cheating
iv.
Violation of privacy
v.
Dissemination of obscene material
2. Cyber crime against property
i.
Credit card fraud
ii.
Intellectual property fraud
iii.
Internet time theft.
3. Cyber crime against government
i.
Cyber terrorism
ii.
Website defacement
iii.
Attacks against e-governance websites
101. What is copy right
Copyright is a legal right given to the creators for an original work, usually for a limited
period of time.
Copyright applies to a wide range of creative, intellectual or artistic forms of works which include books,
music painting, sculpture, films, advertisements and computer software.
This covers the right for reproduction, communication to the public, adaptation and translation of the
work.
The general rule is that the copyright lasts for 60 years after the death of the last surviving author
This copyright holder of a work can authorize or prohibit
a. Reproduction of the work in all forms
b. Its public performance and communication to the public
c. Its broadcasting
d. Its translation into other languages
e. Its adaptation such as from a novel to a screenplay for a film
HSE II Computer science[Type text]
Page 34
35
102. What do you meant by infringement
Unauthorized use of intellectual property rights such as patents, copyrights and trademarks are called
intellectual property infringement.
Patent infringement is caused by using or selling a patented invention without the permission from
the patent holder
Trademark infringement occurs when one party uses a trademark that is identical to a trademark
owned by another party, where both the parties use it for similar product or services
Copyright infringement is reproducing, distributing, displaying or adapting a work without the
Permission from the copyright holder. Enforcement of the copyright is generally the responsibility of
the copyright holder.
103. Explain the right given to the owner by IPR.
The works that are creation of the mind are called intellectual property. Intellectual property included
creative works like music literary work, artistic work, discoveries,
inventions, designs and software development should be protected from unauthorized access. IPR
refers to the exclusive right given to a person over the creation of his mind for a period of time.
· IPR enables people to earn recognition and financial benefits from what they invent or create.
· It was first recognized by the Paris Convention for the protection of Industrial Property in 1883 and
later by the Berne Convention for Protection of Literary and Artistic work in 1886.
· Both treaties now administered by World Intellectual Property Organisation (WIPO). · WIPO is an
agency of the United Nations and is dedicated to ensure that the rights of the creators and owners of
intellectual property are protected worldwide.
IPR is divided into two categories
A. Industrial Property
(Patents, trademark, industrial designs, geographical indications)
B. Copyright
104 Infomania become a phychological problem , your opinion
Infomania is a state of getting overloaded with information that cannot be processed or managed.
This results in neglecting duties and responsiblilities.
Constantly checking emails, social networking sites, online news etc are the symptoms of infomania
Excessive use of technology reduces intelligence. It may lead to lack of concentration and sleep loss.1
HSE II Computer science[Type text]
Page 35
36
105 Explain Cyber Ethics
Avoid use of unauthorized software
Do not use bad or rude language in social media and emails
Do not respond or act on emails sent from unknown resources
Do not hide your identity and fool others.
Abide by the cyber laws
Other questions
1. Distinguish between
Int score[10];
Int * p = new int[];
2. Distinguish between
Char str[10];
Char *str;
3. Explain char *str[10];
4. Name one dynamic data structure, explain the advantages of this.
5. Char str[]=”computer”;
Cout<<*(str+3);
Predict the output character why?
Is it possible str++;
6. Struct student
{
int rollno;
Char name[20];
Float mark =100;
};
This initialization is not possible. Why?
7. Differentiate
Int *p =new int(5) ; and
int *p = new int [];
8. Differentiate *P+1 and *(p+1)
9. Why memory address always represented by Hex.
Hexa decimal system can express larger values with lesser number of digits compared to decimal
sytem..
1. Differentiate char *name[10]; and char name[10][20];
First array can contain maximum of 10 strings, where each string can contain any number of
characters
In second case array can contain 10 names,, each of which can have maximum of 19 characters.
One byte reserved for num character. Each string is referred by name[i].
HSE II Computer science[Type text]
Page 36
37
10. Extensibility :- ability of a program to allow significant extension of its capabilities without major
rewriting of code or change in its basic architecture is called extensibility.
11. Object of the class are called ---instances
12. A blue print for an object in oop is called ------- class
13. A larger program is divided into smaller ones this process is known as modularity
14. Once a class is created, if needed , it can be distributed for use in other programs, this is called ----reusablility
15. Wrapping up of data and function together is known as --16. Access of data is restricted by the feature is known as ----access privilege , ie private, public and
protected.
17. The ability of a message or data to be processed in more than one form is called polymorphism
18. To reveres a given string by using – data structure. Stack
19. Stack using --- principle LIFO
20. Queue using --- Principle FIFO
21. https stands for --- hyper text transfer protocol secure
22. ----number is used to identify various services like email, file server etc
23. Domain names and ip addresses are managed by --- servers root servers
24. Root servers are maintained by ----- ICANN ( INTERNET CORPORATION FOR ASSIGNED
NAMES AND NUMBERS.)
25. The number of bits in a software port number is --- 16 bit
26. The webpage remains same until their code is changed manually Is called --- static webpage
27. Html developed by --Tim burners Lee
28. In html #cococo indicates --- color
Grey
29. <!-- and -- > tag will be treated as ---- in HTMl
comments – that are not executable by html.
30. Father of php Rasmus Lerdorf
31. Wamp stands for --- windows, Apache,MYSQL ,PHP
32. Lamp stands for ---Linux, Apache,Mysql,PHP
33. What will be the output of the following code?
Function fun($var)
{
$var = $var – ($var/10*5)
Return $var;
}
Echo fun(100);
ans :- 2
2. How we can extract the string “hotmail.com from a string [email protected]?
Strpos(“[email protected]”,”hotmail”);
Output will be :-6
34. ---- tag is used to grouping related controls in a form.
<fieldset>
35. Action and ----- are the main attributes of form method
36. In javascript ---------- function is used to print a text in the body section of an HTML page.
Document .write
HSE II Computer science[Type text]
Page 37
38
3. ------------is the value given to the language attribute of script tag specifies the code follow is java
LANG = “JAVASCRIPT”
37. What is the use of number() in java
HSE II Computer science[Type text]
Page 38
© Copyright 2026 Paperzz