Sumit
Sumit
Sumit
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 :
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?
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.
#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
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?
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
9
2. WAP in C to give your introduction.
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'.
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.
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:
19
ADVANTAGES OF HTML
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.
DISADVANTAGES OF HTML.
While HTML has many advantages, it
also has some limitations and disadvantages:
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.
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:
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.
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.
28
BASIC STRUCTURE TO CREATE A EXPLAINATION
TABLE:
This HTML code uses the
<html> following tags:
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.
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.
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.
FEATURES OF MS-WORD
a. Document creation, storage and retrieval.
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.
40
XI. Margins:-
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.
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.
44
B. Text Format and Alignment:-
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:
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.
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:
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.
50
C. Print a Spreadsheet:-
51
MS POWERPOINT
Microsoft PowerPoint is a robust application that allows you to
combine text, graphics, and predesigned backgrounds to create
professional presentations.
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.
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.).
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:-
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.
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.
57
7. Double-click on the field names in the field list
window which you would like to include in the query.
58