0% found this document useful (0 votes)
67 views

Hsslive - In: Structures and Pointers

The document discusses key concepts related to computer science including structures, pointers, object oriented programming, data structures, web technologies, HTML, JavaScript and more. It covers topics like defining structures and pointers, the basic concepts of OOP like encapsulation and inheritance, different data structures and their operations, components of web pages and HTML tags, and an introduction to client side scripting using JavaScript. The chapters provide explanations of these concepts along with examples and code snippets.

Uploaded by

Not Me
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views

Hsslive - In: Structures and Pointers

The document discusses key concepts related to computer science including structures, pointers, object oriented programming, data structures, web technologies, HTML, JavaScript and more. It covers topics like defining structures and pointers, the basic concepts of OOP like encapsulation and inheritance, different data structures and their operations, components of web pages and HTML tags, and an introduction to client side scripting using JavaScript. The chapters provide explanations of these concepts along with examples and code snippets.

Uploaded by

Not Me
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Computer Science – XII

Chapter 1
Structures and Pointers

Structure is a user-defined data type to represent a collection of different types of data under a
common name.
Eg: struct stud
{ int roll;
char name[20];
}
Pointer is a variable that can hold the address of a memory location.
Syntax to declare pointer variable: data_type * variable;
The address of operator (&), is used to get the address of a variable.

in
The value at operator (*) is used to retrieve the value pointed to by the pointer.

Two types of memory allocation:


The memory allocation before the execution of the program is static memory allocation. Memory
allocation during run-time is dynamic memory allocation. The new operator is used for dynamic

.
memory allocation and delete to de-allocate (free) the memory.
ve
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Chapter 2
Concepts of Object Oriented Programming
Procedural paradigm V/s OOP
Procedural paradigm Object Oriented Paradigm
sli
• Data is undervalued. • Data is given importance.
• Procedure is given importance. • Procedure is driven by data.
Basic Concepts of OOP
1. Data abstraction: Showing only the essential features and hiding the details.
2. Data encapsulation: Binds the data and functions together.
3. Polymorphism: The ability to process objects differently.
Hs

4. Inheritance: Creating new classes by deriving properties from existing class.


5. Modularity: Partitioning a program into small segments.

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Chapter 3
Data Structures and Operations
Data structure is a way of organising logically related data items which can be processed as a single
unit.
Classification of data structures:
Computer Science – XII
Operations on Data Structures: Traversing, searching, inserting, deleting, sorting and merging.
Stack: Data structure that follows LIFO (Last In First Out) principle.
Push Operation: Inserting a new data item into the stack at Top position. Attempt to insert an item
in a filled stack is stack overflow.
Pop Operation: Deleting an element from the top of a stack. Attempt to delete an item from an
empty stack is stack underflow.
Algorithm to Push Algorithm to Pop

in
Queue: Data structure that follows the FIFO (First In First Out) principle. A queue has two end points
- Front and Rear.

.
Linked list: It is a collection of nodes, where each node consists of two parts – a data and a link.
Linked list is a dynamic data structure.
ve
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Chapter 4
Web Technology
Static web page V/s Dynamic web page
sli

Client side scripting V/s Server side scripting


Hs

Client side scripting languages: JavaScript, VB Script


Server side scripting languages: PHP, JSP, ASP, Pearl
Structure of HTML code
<HTML>
<HEAD>
<TITLE> </TITLE>
</HEAD>
<BODY>
</BODY>
</HTML>
Computer Science – XII
HTML Tags
Tags Use Attributes Values and Purpose
<HTML> To start an HTML document
<HEAD> To specify the head section of an HTML document.
<TITLE> This tag pair contains the text to be displayed in the title bar of browser.
Defines the body Bgcolor Colour for the background of a web page.
<BODY> section of the web Background Image as the background of a web page.
page. Text Colour of the text in the web page.

Tags Use Attributes Values and Purpose


<H1> ….. To provide different
Align “left”, “right” and “center” are the values.
..… <H6> levels of headings.

in
<BR> To break the current line of text and continues in the next line. No attributes.
<P> To create a paragraph leaving a blank line.
<HR> To draw a horizontal line across the width of the browser window

.
Text formatting tags
Tags
<B> and <STRONG>
<I> and <EM>
<U>
ve Use
To make the text bold face.
To make the text italics or emphasis.
To underline the text
<S> and <STRIKE> To strike through the text
<BIG> To make the text big sized
sli
<SMALL> To make the text small sized
<SUB> To make the text subscripted
<SUP> To make the text superscripted
<Q> To enclose the text in “double quotes”
<BLOCKQUOTE> To indent the text
Hs

Tags Use Attributes Values and Purpose


<MARQUEE> To scroll a text or image in the browser
To change the Color To set the text colour
size, style and Face It specifies the font face like Arial, Calibri, etc.
<FONT>
colour of the
Size It specifies the font size
text enclosed
To insert
<IMG> image in a Src To specify the file name of the image
web page
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

3 Joy John’s CS Essential


Computer Science – XII

Chapter 5
Web Designing using HTML

Different types of Lists in HTML


There are three kinds of lists in HTML - unordered lists, ordered lists and definition lists.
Tags Use Attributes Values and Purpose
To specify the type of bullet. “Disc”, “Circle”
<UL> To create bulleted list Type and “Square” are the values for ●, ○ and ▪
To specify the type of numeral. The values are
Type
To create numbered “1”, “I”, “i”, “a” and “A”.
<OL>
list To specify the starting number. The value
Start
should be an integer.

in
To specify an item in the unordered or ordered list. Used inside the pairs <UL>…</UL>
<LI>
and <OL> … </OL>
<DL> To create a definition list
<DT> Used inside <DL>… </DL> to specify each data item (or term) in the list

.
<DD> Used after each <DT> to describe the term

Links in HTML ve
A hyperlink (or simply link) is a text or an image in a web page, on clicking which another document
or another section of the same document will be opened. The <A> tag, called anchor tag is used to
give hyperlinks. Href is the main attribute of <A> tag. The URL (address of the web page/site) is given
as its value. There are two types of linking – internal linking and external linking.
sli
Creating Table in Web page

Tags Use Attributes Values and Purpose


<TABLE> To create table Border Thickness of the border line around the table.

<TR> To specify a row in a table


Hs

<TH> To specify the heading cell.


<TD> To specify the data in a cell.

Input controls in Forms


Textbox – To input a line of text
Password box – To input passwords
Option button (Radio button) – To select an item from a groups of options
Checkbox – To select one or more items in a group
List box – To select one or more items from list of items
Text area – To input multi line text
Submit button – To submit data to the Form handler
Reset button – To clear the entries in the Form

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

4 Joy John’s CS Essential


Computer Science – XII
Chapter 6
Client side Scripting using JavaScript

<SCRIPT> tag: To embed JavaScript code in an HTML file.

Data Types in JavaScript: Number, String, Boolean


Variables: Used for storing values. Declared using the keyword var as: var x;

Operators
Arithmetic operators + – * / %
Increment, decrement ++ ––
Assignment operators = += –= *= /= %=
Relational operators < <= > >= == !=
Logical operators || && !

in
String concatenation +
Control Statements

if (test_expression)
Statement;

.
if (test_expression)

if statements
else
statement_1;

statement_2;
if (test_expression1)
ve
statement_1;
else if (test_expression2)
sli
statement_2;
:
:
else
statement_n;
switch (variable/expression)
Hs

{
case value1: statement1; break;
switch case value2: statement2; break;
statement :
:
default: statement;
}
for (initialization; test; update)
for loop
body;
initialization;
while (test_expression)
{
while loop
body;
update;
}

5 Joy John’s CS Essential


Computer Science – XII
Built-in Functions

Function Use Syntax / Example


alert() To display a text in a message window. alert(“Welcome”);
isNaN() Returns True if the given value is not a number. isNaN(“welcome”); and
That is, the argument contains a non-numeric isNaN(“A123”); return True.
character. Returns False is the argument is isNaN(“13”); and isNaN(13);
return False
numeric.
toUpperCase() Returns the upper case form of the given string. Output of
“Java”.toUpperCase(); will be
JAVA.
toLowerCase() Returns the lower case form of the given string. Output of
“JavaSCIPT”.toLowerCase(); will
be javascript.

in
charAt() Returns the character at a particular position. “JavaScript”.charAt(4); gives S,
st
charAt(0) gives the 1 character of a string. the 5th character.
length property Returns the length (number of characters) of “JavaScript”.length will give 10.
the string.

.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Chapter 7

Types of web hosting


ve Web Hosting

(i) Shared hosting: Most suitable for small websites that have less traffic. Cheaper and easy to use.
Services will be slow.
sli
(ii) Dedicated hosting: Dedicated servers provide guaranteed performance, round-the-clock power
supply, and fast access. But they are very expensive.
(iii) Virtual Private Server (VPS): VPS provides almost the same services at a lesser cost than that of
dedicated hosting. Some popular server virtualization softwares are VMware, FreeVPS, etc.

FTP Client software: FTP client software establishes a connection with a remote server and is used
Hs

to transfer files from our computer to the server computer. SFTP uses Secure Shell (SSH) protocol
which provides facilities for secure file transfer. The popular FTP client software are FileZilla,
CuteFTP, SmartFTP, etc.

Free Hosting: Provides web hosting services free of charge. The size of the files that can be uploaded
may be limited. Audio/video files may not be permitted. Sites.google.com, yola.com, etc. are free
web hosting services.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Chapter 8
Database Management System

Database is an organized collection of inter-related data stored together with minimum redundancy,
which can be retrieved as desirable.
Database Management System (DBMS) is essentially a set of programs which facilitates storage,
retrieval and management of database.

6 Joy John’s CS Essential


Computer Science – XII
Advantages of DBMS:
• Data redundancy (duplication of data) is controlled.
• Data inconsistency is avoided.
• Data are efficiently accessed.
• Data integrity is maintained.
• Data security is ensured.
• Data sharing is allowed.

Components of DBMS: Hardware, Software, Database, Users, Procedures:


Data organisation:
• Field: The smallest unit of stored data.
• Record: A collection of related fields.
• File: A collection of all occurrences of same type of records.

in
• Database: A collection of files associated with an organisation.

Types of Users of database


• Database Administrator (DBA): The person responsible for the control of the centralized and

.
shared database.



application programs.
ve
Application Programmers: Computer professionals who interact with the DBMS through

Sophisticated Users: They interact with the database through their own queries.
Naive Users: People accessing data by invoking one of the application programs.

Relation: A relation is also called Table. Data are organized in the form of rows and columns
sli
Tuple: The rows (records) of a relation are known as tuples.
Attribute: The columns of a relation are called attributes.
Degree: The number of attributes in a relation determines the degree of a relation.
Cardinality: The number of rows (records) or tuples in a relation is called cardinality of the relation.
Domain: It is a pool of values in a given column of a table.
Hs

Schema: The description or structure of a database is called the database schema.


Instance: An instance of a relation is a set of tuples in it.
Types of Keys:
• Candidate key: It is the minimal set of attributes that uniquely identifies a row in a relation.
• Primary key: It is one of the candidate keys chosen to uniquely identify tuples within the relation.
• Alternate key: It is a candidate key that is not chosen as the primary key.
• Foreign key: A key in a table can be called foreign key if it is a primary key in another table.

Relational algebra
The fundamental operations in relational algebra are SELECT(σ), PROJECT (π), UNION,
INTERSECTION, SET DIFFERENCE, CARTESIAN PRODUCT, etc.

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Chapter 9
Structured Query Language
Components of SQL: Data Definition Language (DDL), Data Manipulation language (DML) and Data
Control Language (DCL).

7 Joy John’s CS Essential


Computer Science – XII
DDL commands: CREATE TABLE, ALTER TABLE, DROP TABLE, CREATE VIEW, DROP VIEW.
DML commands: INSERT INTO, SELECT, UPDATE, DELETE FROM.
DCL commands: GRANT, REVOKE.
SQL Data Types: INT or INTEGER, DEC or DECIMAL, CHAR or CHARACTER, VARCHAR, DATE, TIME.

Aggregate Functions in SQL


COUNT() To count the non-null values of a column. SELECT COUNT(Fee) FROM Student;
Also used to get number of rows SELECT COUNT(*) FROM Student;
SUM() To find the sum of values in a column. SELECT SUM(Fee) FROM Student;
AVG() To find the average of values in a column. SELECT AVG(Salary) FROM Employee;
MAX() To find the highest value in a column. SELECT MAX(Marks) FROM Student;
MIN() To find the lowest value in a column. SELECT MIN(Marks) FROM Student;

in
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Chapter 10
Server side Scripting using PHP

Output statements – echo() and print()

.
ve
sli
Data Types in PHP
(i) Core data types – Integer, Float/Double, String, Boolean
(ii) Special data types – Null, Array, Object, Resource

An example for String concatenation:


Hs

$x = “PHP”;
$y = “Script”;
$z = $x.$y;
The . (dot) operator will add the two strings.
Built-in Functions

Function Use Syntax / Example


date() To display a date in given format date(“d-m-y”) displays a
date as 09-11-2017
chr() Returns a character from the specified ASCII chr(65) returns A
value.
strlen() Returns the length of a string. strlen(“hello”) returns 5
strpos() Finds the position of the first occurrence of a strpos (“hello”, “e”)
string inside another string. returns 1
strcmp() Compares two strings strcmp (“he”, “HE”)
returns False
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Computer Science – XII
Chapter 11
Advances in Computing
Serial Computing V/s Parallel Computing
Serial Computing Parallel Computing
(a) Single processor is used. (a) Multiple processors with shared memory.
(b) Instructions are executed sequentially. (b) Instructions are executed concurrently.

Cloud Computing
It refers to the use of computing resources that reside on a remote machine and are delivered to the
end user as a service over a network
Cloud services are grouped into three – Software as a Service (SaaS), Platform as a Service (PaaS) and
Infrastructure as a Service (IaaS).
Applications of Computational Intelligence

in
Biometrics: It refers to the measurements (metrics) related to human characteristics.
Robotics: It is the scientific study associated with the design, fabrication, theory and application of
robots.
Computer vision: It is the construction of meaningful description of the structure and properties of

.
the 3-dimensional world from 2-dimensional images.
Natural Language Processing (NLP): It is branch of computer science that focuses on developing

English, Malayalam etc.


ve
systems which allow computers to communicate with people using human languages such as

Automatic Speech Recognition (ASR): It refers to the AI methods of communicating with a computer
in a spoken language like Malayalam.
Optical Character Recognition (OCR) and Handwritten Character Recognition (HCR): The task of
sli
OCR and HCR are integral parts of pattern recognition.
Bio-informatics: It is the application of computer technology to the management of biological
information.
Geometric Information System (GIS): It is a computer system for capturing, storing, checking, and
displaying data related to various positions on earth’s surface.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Hs

Chapter 12
ICT and Society
Interactions in e-Governance: Government to Government (G2G), Government to Citizens (G2C),
Government to Business (G2B), Government to Employees (G2E)
e-Governance infrastructure: In India, the e-Governance infrastructure mainly consists of State Data
Centers (SDC) for providing core infrastructure and storage, State Wide Area Network (SWAN) for
connectivity and Common Service Centers (CSC) as service delivery points.
e-Business is the sharing of business information, maintaining business relationships and conducting
business transactions by means of the ICT application.
Electronic Payment System (EPS) is a system of financial exchange between buyers and sellers in an
online environment.
e-Banking or electronic banking is defined as the automated delivery of banking services directly to
customers through electronic channel.
e-Learning tools: Electronic books reader (e-Books), e-Text, Online chat, e-Content, Educational TV
channels.

9 Joy John’s CS Essential


Computer Science – XII
Cyber Crime: Cyber crimes include phishing, hacking, denial of service attacks, etc.
Cyber crimes against individuals:
• Identity theft occurs when someone uses another person's identifying information, like their
name, credit card number, etc. without their permission to commit fraud or other crimes.
• Harassment means posting humiliating comments focusing on gender, race, religion, nationality
at specific individuals in chat rooms, social media, e-mail, etc. is harassment.
• Impersonation and cheating: Impersonation is an act of pretending to be another person for
the purpose of harming the victim.
• Violation of privacy: Violation of privacy is the intrusion into the personal life of another,
without a valid reason.
• Dissemination of obscene material: The Internet has provided a medium for the facilitation of
crimes like pornography. The distribution and posting of obscene material is one of the

in
important cyber crimes today.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.
ve
sli
Hs

10 Joy John’s CS Essential

You might also like