Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
55 views58 pages

Sumit

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 58

PROGRAMMING IN C

C Language:-
In 1972 AD, AT and T Bell laboratory of
USA developed and wrote C, a programming language, with the
contribution of Dennis Ritchie. C's popularity can be attributed
to its reliability, simplicity, and user-friendliness.
As a middle-level language, C sits
between high and low-level languages. Earlier, Pascal was
commonly used as a pure programming language, but with its
similar features to C, many programmers switched to C due to
its robustness and platform independence. Consequently, they
found that C was capable of solving user's problems, thus
making it a preferred choice.

1
History of C Language:
Numerous computer languages were
developed by 1960, each with specific purposes.
For instance, COBOL was meant for commercial purposes,
FORTRAN for scientific purposes, and ALGOL for algorithmic
conversion. To create a general-purpose programming language,
Cambridge University introduced CPL. However, the language was
difficult to learn and implement. BCPL was developed as a simplified
version of CPL but could only solve specific problems.
Ken Thompson at AT and T Bell lab created B, which was even more
simplified than BCPL. Dennis Ritchie developed C by inheriting B's
features, his own concepts, and BCPL. C was named so because it was the
immediate predecessor of the B language. Unlike BASIC or Pascal, C was
not developed as a teaching language but as an implementation language.

2
Features of C Language:
C is very popular language because it has
large number of features for programmers to write medium type of
program.
Some basic types of features of C language are given below:-
1. C is highly portable language.
2. It is structured programming language because the program is
divided into the number of functions
3. It is general purpose high level programming language.
4. It is internationally standard programming language.
5. It has both features of high level language as well as low level
language.

OR
 C is a popular language that provides portability.
 A program written in C can easily be transferred from one
computer to another.
 It is faster and more efficient than most other high-level
languages. For instance, incrementing a variable from 0 to
1500 takes 50 seconds in BASIC but only 1 second in C.
 C supports structured programming, making it suitable for
solving programs in terms of functions, modules, and blocks,
which in turn makes program debugging, testing, and
maintenance easier.
 C is also extendible as it is a collection of functions
supported by C library.
 We can add or extend our functions to C programs. C is
flexible and permits the writing of any complex program with
the help of its rich set of in-built functions and operations.
 C also allows the use of low-level language, which makes it a
middle-level language, suitable for both system and
application software development.

3
Advantages of C Language :-
There are various advantages of C languages.
Some of them are listed below :

1. It is machine independent programming language.


2. It is easy to learn.
3. It can be implemented from mobile device to mainframe
computers.
4. It has only 32 keywords, so that easy to remember.
5. It is easy to testing, debugging and maintaining. It is compact
programming language. The statements in C language are generally
very short but very powerful.

Disadvantages of C language:-
C programming language has not strong
disadvantages. But it has some negligible disadvantages that are given
below:-
1. No built-in memory management: C does not have built-in memory management, which
can lead to issues like memory leaks and buffer overflows if not properly handled.
2. Limited object-oriented programming support: C is not an object-oriented
programming language, so it does not provide the advanced features and
functionality that an object-oriented language would offer.
3. No runtime checking: C does not have runtime checking, so it is up to the programmer
to ensure that the program is free from errors and bugs.
4. No automatic garbage collection: Unlike other programming languages, C does not
have automatic garbage collection, so the programmer needs to manually free up
memory space that is no longer required.

4
Why C?

The C tutorial for beginners is incomplete without the


knowledge of why C programming is used. C language was developed due
to various reasons that made it a very specific and convenient
programming language.

The C compiler supports both assembly language features and


high-level language and hence, it is best suitable for writing both system
applications and most of the business packages.

It is a portable language and hence, once the code


is written, it can run on any computer system. C is basically used for
developing Operating Systems. The first Operating System developed
using C was Unix. Although, assembly language provides relatively higher
speed and maximum control over the program it lacks portability.

From the above discussion, we inferred


that the main strength of C is its capability of being functional on any
computer architecture along with great flexibility and reliability.
Moreover, the vast library functions pre-defined in C makes it an optimal
choice for programming. Although assembly language has extremely
powerful programs, it proves it be of great inconvenience when it comes
to creating large applications.

5
Why should beginners learn the C language?
C is the most basic language and almost all
programming languages are derived from C. Other programming
languages inherited their features from C and hence C is called the
mother of all programming languages.

If you learn C, it becomes easy for you to


learn programming languages like Ruby, Python, PHP, C++, JAVA, Lua and
more.
How to Write a Program in C?
Now, taking a break from the theoretical portion, we are now moving
towards the practical approach. First of all, we will start with the
simplest program to print a message.

#include <stdio.h>
int main()
{
// printf() displays the string inside quotation
printf("Welcome to my project ! C language");
return 0;
}
Output – Welcome to my project ! C language

Understanding every line of code


 #include <stdio.h> – It includes a preprocessor command. By this
command, we add all the files and content of stdio.h in the program.
 int main() – Execution of any C program begins with this step.
 printf() – It sends the formatted output to the screen.
 return 0 – This statement shows the end status, that is, the function
returns whatever argument passed in return. Here, 0 is passed as the
return value which means that the function returns NULL value.

6
Career Aspects in C Programming Language
Up till now, I explained all the basic concepts of C
programming. But, what about its career opportunities?

C language is always in demand and you can grab a list of opportunities


for your career growth. Many people talk about moving to advanced
languages like Java, and Python. But, the core of every machine remains
the same – C.

There are dozens of jobs available if you are clear with your
programming concepts.
 Companies that work on embedded programming can be an excellent
option.
 If you are interested in Robotics and other security devices or
electronic devices, you should learn c programming to develop basic
algorithms for various microcontrollers.
 You can become a Software Engineer or a Team Leader if you are
good at Data Structures.
You don’t need to search for career possibilities, just be confident about
what you learn and implement, using logic and proper application of all
the protocols of a programming language.

Hence, you can build your desired career if you excel in it what you study.

Salary Prospects
“The more you learn, the more you earn.”
This comes to be the first concern as of now. Yes, money is important
but at the starting of your career whether you are a student or someone
looking to learn new technology, focus on the ways that can help you
grow.

7
How C Programming Language Works?
C is a compiled language. A compiler is a special tool that compiles the
program and converts it into the object file while is machine readable.
After the compilation process, the linker will combine different object
files and creates a single executable file to run the program. The
following diagram shows the executable of a ‘C’ program.

Nowadays, various compilers are available online, and you can use any of
those compilers. The functionality will never differ and most of the
compilers will provide the features required to both ‘C’ and ‘C++’
programs.

8
Summary

C is considered as the mother of all programming


languages as it has built a strong base for all programming languages like
Java, Python, C++, etc. Let us summarise what we have learned in this C
tutorial. We understood the history of C language, and also how it
became so popular. We also discussed some of the basic features,
advantages, and limitations that the C language possesses. At last, we
discussed the career and salary prospects in C language.

Hopefully, C tutorial for beginners helped you to develop a basic


understanding of the C programming language.

Let’s See Some Examples Of C Programming


1. WAP in C to display the messages:
" This is my first program."
// program to print "This is my first program."
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
printf("This is my first program");
getch();
}

9
2. WAP in C to give your introduction.

“ Hi ! My name is sumit sah”


“I live in Janakpurdham, Nepal”
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
printf("Hi ! My name is sumit sah ");
printf(“I live in Janakpurdham, Nepal”);
getch();
}

10
3. Program to find the factorial of a number
#include <stdio.h>
#include <conio.h>
voidmain()
{
int num, fact = 1;
printf("Enter a number: ");
scanf("%d", &num);
for(int i=1; i<=num; i++)
{
fact = i*fact
}
printf("Factorial of %d is %d", num, fact);
getch();
}
Explaination:
Here, the user is asked to input a positive integer, which
is stored in the variable n. An error check is performed to ensure
that the input is a positive integer, and if not, an error message is
printed and the program exits with a return code of 1. If the input is
valid, the for loop iterates from 1 to n, and the factorial is calculated
by multiplying the previous value of fact by the current value of i. The
final factorial value is stored in the variable fact, which is printed as
output along with the original input value n.

11
4. WAP a program in C to convert Fahrenheit to Celsius.
#include <stdio.h>
#include <conio.h>
void main()
{
int fahrenheit, celsius;
printf("Enter temperature in Fahrenheit: ");
scanf("%f", &fahrenheit);
celsius = (fahrenheit - 32) * 5 / 9;
printf("%d Fahrenheit is equal to %d Celsius", fahrenheit,
celsius);
getch();
}

Explaination:
This program first takes an input float fahrenheit to
represent the temperature in Fahrenheit. It then uses the
formula (fahrenheit - 32) * 5 / 9 to convert Fahrenheit to
Celsius and stores the result in a float variable celsius.
Finally, it prints the original temperature in Fahrenheit and
the converted temperature in Celsius using the printf()
function with two decimal places.

12
5. WAP a program in C to find sum of two numbers.

#include <stdio.h>
#include <conio.h>
Void main() {
int num1, num2, sum;
printf("Enter first number: ");
scanf("%d", &num1);
printf("Enter second number: ");
scanf("%d", &num2);
sum = num1 + num2;
printf("Sum of %d and %d is %d\n", num1, num2, sum);
getch();
}

Explanation:
This C program prompts the user to input two integer
numbers, then it calculates and prints their sum to the console
using the printf function. It achieves this by declaring three
integer variables: num1, num2, and sum. It prompts the user to
enter the first number by displaying "Enter first number: ", reads
the input using scanf with the format specifier %d, stores it in
num1. It prompts the user to enter the second number by
displaying "Enter second number: ", reads the input using scanf
with the format specifier %d, stores it in num2. It calculates the
sum of num1 and num2, stores it in sum, and prints the result to
the console using printf with the format specifier "Sum of %d and
%d is %d\n". The program returns 0 to the operating system,
indicating successful execution of the program.

13
6. WAP a program in C to find the largest number.
#include <stdio.h>
int main() {
int num1, num2, num3, max;
printf("Enter first number: ");
scanf("%d", &num1);
printf("Enter second number: ");
scanf("%d", &num2);
printf("Enter third number: ");
scanf("%d", &num3);
if (num1 > num2 && num1 > num3) {
max = num1;
} else if (num2 > num3) {
max = num2;
} else {
max = num3;
}
printf("The largest number is %d\n", max);
return 0;
}

Explaination:
This C program finds the largest among three
user-input integers. It declares variables num1, num2, num3, and
max, prompts the user for input, reads the input, and assigns it to
the variables. Then, it uses if-else if-else statement to determine
the maximum value among the three input numbers and assigns it
to max. Finally, it prints the largest number to the console and
returns 0 to the operating system.

14
7. WAP in C to print multiplication table of a number.
#include <stdio.h>
int main()
{
int num, i;
printf("Enter a number: ");
scanf("%d", &num);
for (i = 1; i <= 10; i++) {
printf("%d x %d = %d\n", num, i, num * i);
}
return 0;
}

Explaination:
This C program prompts the user to enter an integer
number and then prints the multiplication table of that number from 1
to 10. It declares two integer variables: num and i. It prompts the user
to enter a number by displaying "Enter a number: ", reads the input using
scanf with the format specifier %d, stores it in num. Then, it uses a for
loop to iterate from i = 1 to i <= 10. Inside the loop, it uses printf to print
the multiplication table of num up to 10. Specifically, it displays num, i,
and the result of num * i using the format specifier "%d x %d = %d\n".
The loop continues until i reaches 10, at which point the loop terminates.
Finally, the program returns 0 to the operating system, indicating
successful execution of the program.

15
8. WAP in C to print multiplication table of a number.
#include <stdio.h>
int main() {
int num;
printf("Enter a number: ");
scanf("%d", &num);
if (num % 2 == 0) {
printf("%d is even\n", num);
} else {
printf("%d is odd\n", num);
}
return 0;
}

Explaination:
This is a simple C program that prompts the user to enter an
integer number using the printf() function. Then, it uses the
scanf() function to read the user input and store it in the variable
'num'.

The program then checks whether the number is even or odd by


using the modulus operator (%) to check if the remainder of
dividing the number by 2 is zero. If the remainder is zero, the
number is even, and the program prints the message "number is
even". Otherwise, the number is odd, and the program prints the
message "number is odd".

Finally, the program returns 0 to indicate that it has completed


successfully.

16
HTML(Hyper Text Markup Language)
HTML:
HTML (Hypertext Markup Language) is a markup language
used for creating and structuring content on the World Wide Web. It
provides a standardized way of defining the structure and layout of web
pages, including text, images, videos, and other multimedia elements.

HTML is based on a system of tags and attributes that are


used to define the structure and presentation of web content. For
example, the <html> tag is used to define the start of an HTML
document, the <head> tag is used to define the header section of the
document, and the <body> tag is used to define the main content section
of the document.

HTML documents are typically created using a text editor


and saved with a .html file extension. The document can then be viewed
in a web browser, which interprets the HTML code and displays the
content in a visual format.

HTML is constantly evolving, with new versions and


features being introduced regularly. The latest version of HTML is
HTML5, which includes new tags and attributes for improved multimedia
support, as well as improved accessibility and mobile device support.

17
FEATURES OF HTML:
1. Structure: HTML provides a standardized way of defining the structure and
layout of web pages, including text, images, videos, and other multimedia
elements.
2. Accessibility: HTML provides several features for improving the accessibility
of web content, such as alt text for images, semantic markup for screen
readers, and ARIA attributes for interactive elements.
3. Interactivity: HTML supports interactivity through features such as forms,
buttons, links, and multimedia elements, allowing users to interact with web
content in a dynamic way.
4. Multimedia: HTML supports a variety of multimedia elements, such as images,
audio, and video, allowing for rich and engaging content.
5. Compatibility: HTML is widely supported by web browsers and can be used on
a variety of platforms and devices, making it a flexible and accessible language
for web development.
6. Easy to learn: HTML has a simple syntax and is easy to learn, making it an ideal
language for beginners in web development.
7. Integration with other technologies: HTML can be integrated with other web
technologies such as CSS and JavaScript to create dynamic and responsive
web pages.

18
IMPORTANCE OF HTML.
HTML is important for several reasons:

1. Creating web pages: HTML is the foundation of web development,


and is used to create the structure and content of web pages.
Without HTML, it would not be possible to create websites and
web applications.
2. Standardization: HTML provides a standardized way of creating
web pages, ensuring that web content is consistent and accessible
across different platforms and devices.
3. Accessibility: HTML provides several features for improving the
accessibility of web content, such as semantic markup for screen
readers and ARIA attributes for interactive elements. This
ensures that web content is accessible to all users, including those
with disabilities.
4. Search engine optimization (SEO): HTML is important for SEO, as
it provides search engines with the structure and content of web
pages, which they use to index and rank web content in search
results.
5. Integration with other technologies: HTML can be integrated with
other web technologies such as CSS and JavaScript to create
dynamic and responsive web pages. This allows developers to create
engaging and interactive web experiences for users.

Overall, HTML is a crucial language for web development, and its


importance will continue to grow as the web becomes more ubiquitous
and integral to our daily lives.

19
ADVANTAGES OF HTML

1. HTML is important for several reasons:


2. Creating web pages: HTML is the foundation of web development,
and is used to create the structure and content of web pages.
Without HTML, it would not be possible to create websites and
web applications.
3. Standardization: HTML provides a standardized way of creating
web pages, ensuring that web content is consistent and accessible
across different platforms and devices.

20
4. Accessibility: HTML provides several features for improving the
accessibility of web content, such as semantic markup for screen
readers and ARIA attributes for interactive elements. This
ensures that web content is accessible to all users, including those
with disabilities.
5. Search engine optimization (SEO): HTML is important for SEO, as
it provides search engines with the structure and content of web
pages, which they use to index and rank web content in search
results.
6. Integration with other technologies: HTML can be integrated with
other web technologies such as CSS and JavaScript to create
dynamic and responsive web pages. This allows developers to create
engaging and interactive web experiences for users.

Overall, HTML is a crucial language for web development, and its


importance will continue to grow as the web becomes more ubiquitous
and integral to our daily lives.

DISADVANTAGES OF HTML.
While HTML has many advantages, it
also has some limitations and disadvantages:

1. Limited functionality: HTML is primarily used for creating the


structure and content of web pages, and has limited functionality
for creating interactive and dynamic web experiences. To achieve
more advanced functionality, other web technologies such as
JavaScript and CSS are needed.
2. Lack of design options: HTML has limited design options, and
developers need to use other web technologies such as CSS to

21
style and format web content. This can be a disadvantage for
developers who are looking for more design flexibility.
3. Browser compatibility issues: Although HTML is widely supported
by web browsers, there can be compatibility issues with older
browsers or browsers that don't support the latest HTML
features. This can result in inconsistencies in how web pages are
displayed on different devices and platforms.
4. Security risks: HTML can be vulnerable to security risks such as
cross-site scripting (XSS) and code injection attacks. Developers
need to take measures to secure their web content and prevent
malicious attacks.
5. Limited multimedia options: Although HTML supports multimedia
elements such as images, audio, and video, it has limited options
for creating and manipulating multimedia content. Other web
technologies such as Flash or Silverlight are often used for more
advanced multimedia applications.
6. Overall, while HTML is an essential language for web development,
it has some limitations and disadvantages that developers need to
be aware of and work around to create effective web content.

22
HTML page structure:
The basic structure of an HTML page is laid
out below. It contains the essential building-block elements (i.e.
doctype declaration, HTML, head, title, and body elements) upon which
all web pages are created.

1. <!DOCTYPE html>: This is the document type declaration (not


technically a tag). It declares a document as being an HTML
document. The doctype declaration is not case-sensitive.
2. <html>: This is called the HTML root element. All other elements
are contained within it.
3. <head>: The head tag contains the “behind the scenes” elements
for a webpage. Elements within the head aren’t visible on the front-
end of a webpage. HTML elements used inside the <head> element
include:
4. <style>-This html tag allows us to insert styling into our webpages
and make them appealing to look at with the help of CSS.
5. <title>-The title is what is displayed on the top of your browser
when you visit a website and contains title of the webpage that you
are viewing.
6. <base>-It specifies the base URL for all relative URL’s in a
document.
7. <noscript>– Defines a section of HTML that is inserted when the
scripting has been turned off in the users browser.
8. <script>-This tag is used to add functionality in the website with
the help of JavaScript.
9. <meta>-This tag encloses the meta data of the website that must
be loaded every time the website is visited. For eg:- the metadata
charset allows you to use the standard UTF-8 encoding in your

23
website. This in turn allows the users to view your webpage in the
language of their choice. It is a self closing tag.
10. <link>– The ‘link’ tag is used to tie together HTML, CSS and
JavaScript. It is self closing.
11. <body>: The body tag is used to enclose all the visible content of a
webpage. In other words, the body content is what the browser
will show on the front-end.

An HTML document can be created using any text editor. Save the text
file using .html or .htm. Once saved as an HTML document, the file can
be opened as a webpage in the browser.

24
WHY TO LEARN HTML:

Learning HTML, or HyperText Markup Language, is important for a number of


reasons. Here are some of the key reasons why you should consider learning HTML:

1. Building websites: HTML is the foundation of every website on the internet.


By learning HTML, you will be able to create and publish your own websites, and make
modifications to existing websites.

2. Understanding web development: If you are interested in a career in web


development, learning HTML is essential. HTML is the starting point for web
development and is the language that all other web development languages, such as
CSS and JavaScript, build upon.

3. Enhancing job prospects: Knowledge of HTML is highly valued by employers,


and having HTML skills on your resume can make you a more attractive job candidate,
especially for roles in web development, digital marketing, or content creation.

4. Improving website performance: Understanding HTML can help you optimize


website performance by optimizing HTML code and reducing load times, which can
improve user experience and search engine optimization.

5. Communication with developers: If you work with web developers or web


designers, having a basic understanding of HTML can help you communicate more
effectively with them and make more informed decisions.

6. Creating content: Learning HTML can be helpful if you create content for the
web, such as blog posts or social media posts. By understanding HTML, you can ensure
that your content is optimized for web publishing and is easily accessible to your
audience.

In summary, learning HTML is a fundamental skill for anyone interested in web


development, content creation, or digital marketing. It is the building block for
creating websites and understanding how the internet works, and is a valuable skill
that can enhance job prospects and improve website performance.

25
STRUCTURE OF HTML
Basic Webpage Structure:
<!DOCTYPE html>
<html>
<head>
<title>My Webpage</title>
</head>
<body>
<h1>Welcome to my webpage</h1>
<p>This is my first HTML webpage!</p>
</body>
</html>

26
BASIC STRUCTURE TO INSERT A PICTURE :
<!DOCTYPE html>
<html>
<head>
<title>My Image</title>
</head>
<body>
<h1>My Image</h1>
<img src="myimage.jpg" alt="My Image">
</body>
</html>

27
BASIC STRUCTURE TO CREATE A EXPLANATION
FORM :
1. <form>: This is the
<!DOCTYPE html> opening tag for a form
element that contains
<html> the input fields for the
contact form.
<head>
2. <label>: This is the
<title>Contact Us</title> opening tag for a label
</head> element that displays
the text "Name" and
<body> "Email" next to their
respective input fields.
<h1>Contact Us</h1>
3. for: This is an attribute
<form> of the <label> tag that
<label for="name">Name:</label> specifies the ID of the
input field it is
<input type="text" id="name" associated with.
name="name"><br><br>
4. type: This is an
<label for="email">Email:</label> attribute of the
<input> tag that
<input type="email" id="email" specifies the type of
name="email"><br><br> input field, in this case
"text" and "email".
<label
for="message">Message:</label><br> 5. id: This is an attribute
of the <input> tag that
<textarea id="message" specifies a unique
name="message"></textarea><br><br> identifier for the input
field.
<input type="submit" value="Submit">
6. name: This is an
</form> attribute of the
</body> <input> tag that
specifies the name of
</html> the input field.

7. <textarea>: This is the


opening tag for a
multi-line input field
that allows the user to
input a message.

28
BASIC STRUCTURE TO CREATE A EXPLAINATION
TABLE:
This HTML code uses the
<html> following tags:

<head>  <table>: Creates a table


on the page.
<title>My Table</title>
 <tr>: Defines a row in a
</head>
table.
<body>  <th>: Defines a header
<h1>My Table</h1> cell in a table.

<table>  <td>: Defines a data cell


in a table.
<tr>
<th>Name</th>
The <table> tag is used to
<th>Age</th> create a table, with <tr> tags
<th>Country</th> used to define rows and <th>
and <td> tags used to define
</tr> header and data cells,
respectively.
<tr>
Overall, these tags are used to
<td>John</td>
create a well-structured and
<td>30</td> organized webpage, with clear
headings and content
<td>USA</td> presented in a tabular format.
</tr> This program is an HTML
<tr> code for creating a simple
table on a webpage. It defines
<td>Sara</td> a basic structure of an HTML
document and contains a
<td>25</td>
heading, "My Table," as well
<td>Canada</td> as a table with three columns:
"Name," "Age," and
</tr>
"Country." Two rows are
</table> created within the table, each
containing data for a person's
</body> name, age, and country.
</html>

29
CSS(Cascading Style Sheets)
CSS is a styling language used for
describing the presentation and look of a document written in markup languages
such as HTML. Here are some of the key features and advantages of using CSS:
Features:
1. Selective styling: With CSS, you can selectively style different elements of a
document, allowing you to easily change the look and feel of a website or
document without changing the underlying content.
2. Cascading: CSS allows you to create cascading styles, meaning that styles
can be inherited from parent elements to child elements, making it easier to
maintain and update the styling of a website or document.
3. Separation of presentation and content: CSS separates the presentation
and content of a document, making it easier to manage and update the
styling without having to modify the content.
4. Reusability: CSS allows you to define styles once and apply them to multiple
elements on a website or document, making it easier to create a consistent
look and feel across a website.
5. Extensibility: CSS allows you to extend the functionality of a website or
document by creating custom styles, classes, and IDs.
Advantages:
1. Improved website performance: By separating the presentation and content
of a website, CSS can improve website performance by reducing the amount
of HTML code needed to style a document, resulting in faster load times.
2. Consistency: CSS allows you to create consistent styles across a website
or document, making it easier to maintain and update the look and feel of a
website.
3. Accessibility: CSS can improve the accessibility of a website by allowing
developers to create more accessible styles, such as high-contrast styles for
users with visual impairments.
4. Search engine optimization (SEO): By reducing the amount of HTML code
needed to style a document, CSS can improve the SEO of a website by
making it easier for search engines to crawl and index the website.
5. Print-friendly: CSS allows you to create print-friendly styles, making it easier
to print web pages and documents without having to modify the content.

30
HOW TO WORK ON HTML
To open and save an HTML file using Notepad, follow these steps:
1. Open Notepad by searching for it in the Windows Start Menu.

31
2. Create a new file by clicking on"New file".
3. Type in your HTML code or copy and paste it into the Notepad window.

4. Save the file by clicking on "File" and then "Save As".

32
5. Choose a file name for your HTML file and add the ".html" extension to the
end of it (e.g. "mywebsite.html").
6. Choose a file location to save your HTML file.
7. Click on "Save" to save your HTML file.

To run your HTML file in a web browser, follow these steps:


1. Navigate to the location where you saved your HTML file.
2. Double-click on the file to open it in your default web browser.
3. Your HTML file should now be displayed in the web browser.
Alternatively, you can also open your HTML file directly in your web browser.
Simply right-click on the HTML file and choose "Open with" and then select your
web browser from the list of available programs.

33
APPLICATION PACKAGE
1) THE APPLICATION PACKAG
(a) Word processor (word processing):- The software which
is designed to create, edit and format textual matter like
letters, application, newspaper and book is called word
processing software.Some of the common word processing
software are: MS-WORD, WORD Star, Word perfect, page
maker etc.
FEATURES OF WORD PROCESSING SOFTWARE:
 Correction of contents inline without a marker and
eraser.
 Easy formatting.
 Automatic spelling and grammar check.

34
MICROSOFT WORD
Microsoft word is one of the most popular windows based word
processing application soft ware. It was developed by
Microsoft Corporation in USA .MS-WORD provides many
facilities like creating documents, reports, newspaper, thesis
etc.

THE DIFFERENT AVAILABLE VERSION OF MS-WORD ARE:-

a. Microsoft word 1997

b. Microsoft word 2000 etc.

FEATURES OF MS-WORD
a. Document creation, storage and retrieval.

b. Spelling and grammar check. Etc


I. Launch Word:-
To start Word 2013, click on the Start button, select All
Programs, select Microsoft Office, and then select Microsoft
Word 2013 from the menu options. A Microsoft Word Icon may
also be available on your desktop for quick access. Double click
on the icon to start the application.

35
II. Window and Ribbon Features:-
The screen shot below displays the primary components of the
Word 2013 interface.

36
III. File Tab
The File tab provides you with the Backstage that provides
information pertaining to your document and options to help
setup your window defaults. The Backstage also contains
standard commands such as, Save, Save As, New, Print, etc.

37
IV. Templates:-
Microsoft Office has a variety of predesigned templates
within specific categories.
A. Open Templates
1. Select the File tab, and then click on the New
option.
The Available Templates window will appear

38
V. Window Options:-
The Microsoft Word application allows you to customize
setting and preferences as you work within your Word
document.
A. Set options
1. Click on the File tab, and then select the Options
item.
2. The Word Options window will appear. This is where
you can choose your desired settings and preferences.

39
X. Save a Document:-

A. Save
1. Click on the File tab, then select the Save As option to
save a document permanently to your hard drive or other
storage device.
(The instructor will demonstrate where to save document.
2.The Save As window will appear.
[Grab your reader’s attention with a great quote from the document or use this space to emphasize a
key point. To place this text box anywhere on the page, just drag it.]

1.

3. In the Directory sections on the left side of the


window, click on the icon where you wish to save your
document. In this exercise click on the Desktop.
4. In the File Name box, type your desired document
name, and then click on the Save button.

40
XI. Margins:-

Microsoft Word 2013 margins are defaulted to 1


inch for the top and bottom, and 1 inch for the left
and right. To change your margins, use the Margin
button found on the Page Layout ribbon.

A. Create Margins
1. Select the entire document text, by
pressing the Ctrl key,then place the mouse
pointer anywhere on the left margin, and
then click once on the right mouse button.
2. Select the Page Layout tab.
3. In the Page Setup group, click on the
Margins button
4. The predesigned margins panel will appear.
5. Change the margin by selecting the top
margin button (top and bottom 0.5” – Left
and Right 0.5”).

41
Note:- If you prefer a margin not listed, then click
on Custom Margins at the bottom of the panel to
customize your margin. The Page Setup window will
appear, and then make your desired margin choices
from the window options.

42
XII. Line Spacing:-
Microsoft Word 2013 defaults the line spacing to
double space (2.0). Line spacing affects an entire
paragraph or document. Use the Line Spacing button
on the Home Ribbon to change line spacing.
A. Add Spacing
1. Make sure the entire document is still
selected.Click on the Home tab.
2. On the Paragraph group, click on the
Line Spacing button, and then select 1.5.

XIII. Format a Document:- Formats can be


applied to any text within your document. The
formatting style are the most common way to
change the appearance of text in a document.

43
XV. Text Alignment:-
Microsoft Word 2013 aligns paragraphs four
different ways relative to the left and right
margins: left, center, right and justified. The Word
2013 default paragraph alignment is left. You can
change paragraph alignment by clicking on an
Alignment button, located on the Home ribbon on
the Paragraph group.

Alignment Option Examples:


 First button - Align Text Left

 Second button - Center Text

 Third button - Align Text Right

 Fourth button - Justify Text

XVIII. Page Breaks and Section Breaks:-


Page Breaks and Section Breaks can be inserted
anywhere within a document.
A. Insert Page Break
1. On the Garden practice document, place the
Insertion point at the end of the last sentence in
the last paragraph.

44
B. Text Format and Alignment:-

Text within a table can be formatted the same way


you format text in other areas of the document.
Use the command buttons found on the Home
ribbon.

A. Add a Picture
Microsoft Office is equipped with a Picture folder
with several photo selections. You can also save
additional photos to the Picture folder or create a
new folder for your pictures. From the Insert
ribbon, you can add a picture to your document:

1. Click on the Picture button, from the


Illustrations group.

45
2. Navigate to your desired Picture folder.
3. Select a photo.
4. Click on the Insert button.

B. Online Pictures
Within Microsoft Office there are numerous online
pictures (clip art and stock photographs) to
illustrate a specific topic. From the Insert ribbon,
add a graphic to your document.

1. Click on the Online Pictures button, from the


Illustration group.
2. The Insert Picture window will appear
3. In the Search box, type your desire graphic
topic, and then press the Enter key.
4. Select your desired Picture, and then click on
the Insert button.

46
A. Shapes
The Shapes option allows you to insert a variety of
shapes on to your document, such as rectangles,
circles, arrows, lines, flowchart symbols, and
callouts. From the Insert ribbon, add a shape to
your document from the multiple selections:

1. Click on the Shapes button, from the


Illustration group.
2. The Shape panel will appear, select your
desired Shape.
3. The mouse pointer will change into a plus
sign.
4. Hold the left mouse button down, and
while dragging your desired shape will
appear.

Note: Continuing to drag the mouse will enlarge the


shape.
B. SmartArt :-Smart Art allows you to change
graphic images in to
visual communication information
including graphical
lists, process diagrams,
organizational charts, etc. From

47
the Insert ribbon, incorporate Smart Art on to
your document:
1. Click on the Smart Art button, from the
Illustration group.
2. The Smart Art panel will appear.
3. Select your desired graphic image, and
then click on the OK button.
Note: Depending on your selection, text and/or
photos can be added.
C.Chart:-
To illustrate and compare data you are able to
utilize the chart option. This is similar to the Excel
chart feature. From the Insert ribbon, add a chart
onto your document:
1. Click on the Chart button,
from the Illustration group.
2. The Chart panel will appear.
3. Select your desired chart
type, and then click on the OK
button.
4. Your selected chart type will
appear next to a spreadsheet.
5. Enter your desired data on to
the spreadsheet and the chart will reflect
your data.

48
On the spreadsheet window, click on the
6.
Close window button, and then your char
twill appear on your document.
XXIV. Additional Quick References:-
A. Cover Page
Microsoft Word enables you to insert a variety of
predesigned cover pages into your document
automatically.
1. Click on the Insert tab, and then go to the
Pages group.
2. Click on the Cover Page button.
3. The Built-In window will appear with
predesign cover pages.
4. Select a cover page of your choice.
5. On the Pages group you can insert a Blank
Page or Page Break as well.

49
MS EXCEL
Microsoft Excel is a powerful electronic spreadsheet program
you can use to automate accounting work, organize data, and
perform a wide variety of tasks.

A. Launch Excel:-
1. Click on the Start button.
2. Click on All Programs
3. Select Microsoft Office from the menu options, and then
click on Microsoft Excel 2013.

B. Basic Steps for Creating a Spreadsheet :-


1. Made a draft of your spreadsheet idea on paper.
2. Enter the data from your draft onto the actual
spreadsheet.
3. Format your data after entering onto the spreadsheet.

4. Calculate data by using mathematical formulas.


5. Save the document. 6. Preview and Print the spreadsheet.

50
C. Print a Spreadsheet:-

1. Click on the File tab, and select the Print option.


2. Preview your spreadsheet on the right-hand side of the
File screen.
3. If you are satisfied with the preview, click the Print
button.
D. Exit Excel
1. use click on the File tab.
2. select the Exit option or click on the Close button in the
upper right-hand corner of the Excel window.
3. If your file has recently been saved, Excel will exit
promptly.

51
MS POWERPOINT
Microsoft PowerPoint is a robust application that allows you to
combine text, graphics, and predesigned backgrounds to create
professional presentations.

A. Launch Microsoft PowerPoint 2013 :-


1.Click on the Start button.
2.Click on All Programs, select Microsoft Office from the menu
options, and then click on microsoft powerpoint 2013.
B. Create Slide Presentation:- This section will teach the basics
of opening PowerPoint and beginning a presentation. When
PowerPoint is launched the Presentation window will appear.
When creating a new presentation, you have choices about how
to proceed. PowerPoint gives you a range of ways with which to
start creating a presentation. You can start your presentation
with:
•Blank:- Slides that are unformatted and have no color scheme.
•Design:- Slide Themes that have design concepts, fonts, and
color schemes.
•Template on Microsoft.com:- Microsoft Office Templates and
Theme Gallery which are arranged according to type (Click on
the File tab, select the New option, and then click on PowerPoint

52
presentations and slides from the Available Templates and
Themes.)

C. Design Theme:-
1.select the Design tab, then on the Theme group, click on the
drop-down arrow next to the last theme.
2.The All Themes window will appear with available presentation
Themes.
3.Hover the mouse pointer over a Theme to preview it.

4.Click on a Theme of your choice.


D.Add Text:-

1.Click in the Title Placeholder and type the text title below.
2.Click in the Subtitle Placeholder
3.Type the text below (You will need to press the Enter key
after each line of text.).

4.Save the presentation.


E.Change Theme:- Change the slide Theme to your presentation.
Select the Design ribbon and then click on the drop-down arrow
on the right-hand side of the last Theme thumb print row. More
Themes will be previewed; select your desired Theme.

53
F.Transition and Animation:- PowerPoint allows you to apply
special effects by using slide transition and text/graphical
animation to make your presentation more visually appealing. I.
Slide Transition:-
1. Go to slide one.
2. Click on the Transition tab and then click on the drop-down
arrow located in the Transition to this Slide group to view the
transition categories .
3. In the Exciting selection, click on the Blinds button. The
selected slide will demonstrate this effect as you make your
choice. Click on the Preview button located on the Transition
ribbon to demo the effect again.
4. To apply your selection to all slides, click on the Apply to
All button, located in the Timing group.
5. Notice the transition indicator icon on the left-hand side
of the thumb print slide in Normal View.
II. Text Animation:-

1. Confirm that you are in Normal View (View, Normal).


2. Go to slide two.
3. Click inside the Text Placeholder and select the text area.

54
4. Click on the Animation tab and then click on the drop-down
arrow located in the Animation group to view the animation
categories.
5. In the Entrance section, click on the Fade button.
6. Notice the animation indicator icon on the left-hand side
of the thumb print slide in Normal View.
7. Go to slide five, and select the Title Placeholder.
8. Click on the Animation tab and then click on the drop-down
arrow located in the Animation group to view the animation
categories.
9. In the Entrance section, click on an animation of your
choice. Note: You can apply timing to or delay the speed of
the selected animation from the Timing group located on the
Animation ribbon.
G. Exit PowerPoint 2013:- To exit PowerPoint, select File and
click on Exit or click on the close button in the upper righthand
corner of your document and you will exit

55
MS ACCESS
A database is a collection of information that is related.
Access allows you to manage your information in one database
file. Within Access there are four major objects: Tables,
Queries, Forms and Reports.

• Tables store your data in your database


• Queries ask questions about information stored in
your tables

• Forms allow you to view data stored in your tables


• Reports allow you to print data based on
queries/tables that you have created

A. Creating a Database:-
1. Start Access
2. Click on Blank desktop database.
3. Under File Name type a name for the database.
4. To change the location of where to store the
database, click the folder icon and select a location 5.
Click Create.
B. Understanding Views:- There are multiple ways to view a
database object. The two views for tables are Design View and
Datasheet View.

56
1. Design View is used to set the data types, insert or delete
fields, and set the Primary Key.
2. Datasheet View is used to enter and view the data for the
records.
C. Creating a Table in Design View:-
1. Click on the Create tab.
2. Click on Table.
3. Switch over to Design View on the Home tab.
4. If prompted to save the table, enter a name and click
on OK.
5. Type the field names and select the appropriate data
type for each field.
6. Continue until all fields are added.
D. Creating a Query:- 1. Click on the Create tab.

2. Click on Query Design in the Queries group.


3. Select the table that you would like to base your
query on.
4. Click Add.

5. Repeat steps 3 and 4 until all tables are added.

6. Close the Show Table window.

57
7. Double-click on the field names in the field list
window which you would like to include in the query.

E. To Save the Query:-


1. Click the Save icon.

2. Enter a name for the query.


3. Click OK.
F. Creating a Form:-
1. Open the table or query on which you are basing the
form.

2. Click on the Create tab.


3. Click on Form in the Forms group.

4. A form is created and opens in Layout View.


G. Creating a Report:-
1. Open the table or query on which you are basing the
report.

2. Click on the Create tab.


3. Click on Report in the Reports group.

4. A report is created in Layout View.

58

You might also like