0% found this document useful (0 votes)
40 views107 pages

Ilovepdf Merged

The document discusses Microsoft Excel and its features. Excel is a spreadsheet program that allows users to organize, analyze, and manipulate data. It has a grid layout of cells arranged in rows and columns for data entry. Excel includes functions, formulas, and macros to perform operations on data.

Uploaded by

swagketa987
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views107 pages

Ilovepdf Merged

The document discusses Microsoft Excel and its features. Excel is a spreadsheet program that allows users to organize, analyze, and manipulate data. It has a grid layout of cells arranged in rows and columns for data entry. Excel includes functions, formulas, and macros to perform operations on data.

Uploaded by

swagketa987
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 107

GLOBAL SCHOOL OF SCIENCE

PROJECT WORK
(COMPUTER SCIENCE)

SUBMITTED BY: SUBMITTED TO:


NAME: Roshan Dangi
CLASS: XI ‘I1’ Department of
ROLL NO.: Computer Science

KATHMANDU, NEPAL
2024
A Project On
Ms-Word/ Ms-Excel/ Ms-PowerPoint/ HTML/ CSS and
C Programming

Submitted as a partial fulfillment of requirement of the curriculum of


GRADE-XI (Computer Science) under National Education Board, Nepal

Submitted By:
Type your name

Under Supervision Of
Roshan Dangi

Date:
1st May, 2024

Global School of Science


Mid Baneshwor, Kathmandu
Nepal
GLOBAL SCHOOL OF SCIENCE
Mid Baneshwor, Kathmandu

Certificate
This is to certify that Mr./Ms. has successfully
completed his/her project work as per the requirement of the
curriculum of GRADE-XI (Computer Science) under National
Education Board, Nepal. He/ She has completed his/her project work
within the prescribed period.

NEB Symbol no/Registration no.:

(Internal Examiner) (External Examiner)

Date: 1st May, 2024


Table of Content

Title Page No.


A. Ms-Word 1 - 10

B. Ms-Excel 11 - 20

C. Ms-PowerPoint 21 - 25

D. HTML / CSS 25 – 40

E. C Programming 41 - 60

F. Conclusion 61

G. Bibliography 62
Topic coverage in Project
Section Topic/ Subtopic No. of programs

A MS-Word

Ms-Word Experiment 4

B Ms-Excel

Ms-Excel Experiment 4

C Ms-PowerPoint

Ms-PowerPoint Experiment 2

D HTML/ CSS

Heading Tag 1

Text Formatting/ Character 1


Formatting

Font Tag 1

Inserting Image 1

Inserting Audio/ Video 1

Hyperlink 2

Inserting table 1

List Tag 2

Form Tag 1

CSS: Internal/External/ Inline 3


E C Programming

Simple Program 7

I/O function in C 3

If statement 1

If … else statement 3

If…else if statement 3

Nested if…else statement 1

Switch case 3

For loop 3

While loop 3

Do…while loop 3

Break statement 1

Continue statement 1

Go to statement 1

Array 6

String Function 7

Note: In your program output, please mention your name, grade


and section.
1

WORD PROCESSING

WHAT IS MICROSOFT WORD?

Microsoft Word is a popular word processing software developed and distributed by


Microsoft Corporation. It is part of the Microsoft Office suite of productivity software and is
available for Windows, Mac, and mobile devices. Microsoft Word provides users with a
wide range of features for creating, editing, and formatting documents. These features
include spell check, grammar check, formatting tools, templates, and the ability to insert
images, tables, and graphs. Microsoft Word is widely used for creating documents such as
letters, reports, resumes, and essays, and it is often the preferred software for students,
professionals, and individuals alike.

STEPS TO OPEN MS. WORD: -

1. Turn on your computer and go to the desktop.


2. Click on the "Start" button located in the lower-left corner of the screen.
3. From the list of programs, find "Microsoft Word" and click on it. You can also search
for "Microsoft Word" in the search bar and click on it from the search results.
4. Another option is to double-click on an existing Word document on your desktop or
in a folder, and it will automatically launch Microsoft Word.
5. Once Word is open, you can create a new document by clicking on "New" or open an
existing document by clicking on "Open" and selecting the file from your computer.

That's it! You're ready to start using Microsoft Word.


TITLE 1- TO PREPARE A BIODATA USING MS. WORD: -
Here are the steps to prepare a biodata using Microsoft Word:

1. Open Microsoft Word on your computer.


1. Click on "File" and select "New" to create a new document.
2. Select "Blank document" or choose a pre-made biodata template if available.
3. Type your name at the top of the document in a larger font size.
4. Add your contact details such as phone number, email address, and home address
below your name.
5. Create sections for your biodata such as "Personal Information," "Educational
Qualification," "Skills," "Work Experience," and "Hobbies and Interests."
6. Under "Personal Information," provide details such as date of birth, marital status,
and nationality.
7. Under "Educational Qualification," list your academic degrees or certifications and
include the name of the institution and the year of completion.
8. Under "Skills," list any relevant skills you have such as proficiency in languages or
computer software.
9. Under "Work Experience," provide details of your past employment history,
including the name of the company, job title, and duration of employment.
10. Under "Hobbies and Interests," mention any hobbies or interests that you have that
may be relevant to the position you are applying for.
11. Add any other relevant information that may help you stand out, such as awards or
achievements.
12. Review and edit your biodata for any errors or typos.
13. Save your biodata by clicking on "File" and selecting "Save As." Choose a file name
and select a location to save the document on your computer.

That's it! You have now prepared your biodata using Microsoft Word.

OUTPUT:

2 of 101
BIO-DATA
NAME: SHUSAM KOIRALA

D.O.B: 26TH OF ASHOJ , 2064 B.S

ADDRESS:

TEMPORARY ADDRESS- SHINAMANGAL, KATHMANDU

PERMANENT ADDRESS- GAIGHAT, UDAYAPUR

CONTACT NO: 9808790334 E-MAIL:


[email protected]

FATHER’S NAME: SUMANT KOIRALA

MOTHER’S NAME: SARALA KOIRALA

NATIONALITY: NEPALESE

SEX: MALE

QUALIFICATIONS:

SCHOOL BOARD GPA

Bright Future Secondary School BLE 3.85

Bright Future Secondary School SEE 3.75

Global School of Science NEB Running

INSTITUTE TRAINING DURATION P ASSED YEAR

Intel
BRIDGE COURSE 2 WEEKS 2079

REFERENCES:

1. DHIRENDRA KUMAR YADAV

Computer Teacher at Global school of science

3 of 101
Contact no: 9810063992

TITLE 2- TO PREPARE A NEWSPAPER USING MS. WORD: -

4 of 101
TITLE 3- TO PREPARE AN INVITATION CARD USING MS. WORD: -

5 of 101
TITLE 4- TO PREPARE A FUNERAL CARD USING MS.
WORD: -

6 of 101
P.T.O MS. EXCEL

2. SPREADSHEET

WHAT IS MICROSOFT EXCEL?

Microsoft Excel is a powerful spreadsheet program developed by Microsoft. It allows users


to organize, analyze, and manipulate large sets of data, perform complex calculations, and
create charts and graphs. Excel is used in a variety of fields, including business, finance,
accounting, and engineering. The software features a grid of cells arranged in rows and
columns, where users can input numerical, text, and date data. Excel includes a wide range
of functions, formulas, and macros that enable users to perform various operations on their
data. Excel is part of the Microsoft Office suite of productivity software and is available for
both Windows and Mac operating systems.

FEATURES OF MS. EXCEL:

1. Spreadsheet layout: Excel has a grid of cells arranged in rows and columns that allows
users to input, organize, and manipulate data.
2. Data entry: Users can enter numerical, text, and date data into cells, either manually
or by importing data from external sources.
3. Formulas and functions: Excel includes a vast library of formulas and functions that
enable users to perform various calculations and operations on their data.

STEPS TO OPEN MS. EXCEL: -

7 of 101
1. Click on the Start menu button, typically located in the bottom-left corner of your
screen.
2. Type "Excel" in the search box located at the bottom of the Start menu. Alternatively,
you can navigate to the Microsoft Excel program icon by clicking on "All Programs" or
"Microsoft Office."
3. Click on the Microsoft Excel program icon. This will launch the program and open a
new blank workbook.

TITLE 1: TO PREPARE A MARKSHEET USING


MS. EXCEL

Here are the steps to prepare a basic marksheet using Microsoft Excel:
1. Open Microsoft Excel on your computer.
2.
3. Create column headers for your marksheet. For example, you may want to
include columns for student name, roll number, subject name, marks
obtained, and total marks.
4. Enter the student details and marks in the appropriate cells under each
column header.
5. To calculate the percentage for each student, create a new column and
use the

FORMULA: = (MARKS OBTAINED/TOTAL MARKS)*100.

This will calculate the percentage automatically for each student.


6. You can also use conditional formatting to highlight the cells that meet a
certain criteria. For example, you can highlight the cells that have scored
below a certain threshold in red color.
7. Once you have entered all the data and performed the necessary
calculations and formatting, you can save the marksheet by clicking on the
8 of 101
"File" menu and selecting "Save As." Give a name to the file and choose
the file format you want to save it in (such as .xlsx).
8. You can also print the marksheet by clicking on the "File" menu and
selecting "Print." Choose the printer and page settings you want, and then
click "Print."

OUTPUT:

FORMULA:

Sum :=SUM(C8:G8)

Percentage :=H9/5

Division :=IF(AND(I9>=90),"Distinction",IF(AND(I9>=75),"First
Division",IF(AND(I9>=65),"Second Division",IF(AND(I9>=35 ), " Third
Division",IF(AND(I9>=0), "Fail")))))

Result := IF(AND(C9>=40,D9>=40,E9>=40,F9>=40),"Pass","Fail")

TITLE 2: TO PREPARE A CALENDAR USING MS.


EXCEL

9 of 101
TITLE 3: TO PREPARE AN ONLINE SALES
TRACKER USING MS. EXCEL

TITLE 4: TO PREPARE A TRAVEL EXPENSE DATA USING


MS. EXCEL

10 of 101
MS Excel is a widely used spreadsheet software that offers several
advantages, including:

1. Organizing and analyzing data: MS Excel allows users to organize, analyze and manipulate large
amounts of data easily. Users can sort, filter, and arrange data in tables, charts, and graphs to better
understand trends and patterns.

2. Calculations and modeling: MS Excel offers a range of mathematical and statistical functions that
make complex calculations and modeling easier. These include financial and engineering functions,
which are particularly useful for professionals in these fields.

3. Time-saving: With features like autofill and copy-paste, MS Excel can save users a lot of time when
entering data or repeating calculations. Excel also offers the ability to create macros, which are scripts
that automate repetitive tasks, further improving efficiency.

OVERALL, MS EXCEL IS A POWERFUL TOOL THAT OFFERS A RANGE OF FEATURES THAT CAN
IMPROVE PRODUCTIVITY AND STREAMLINE WORK PROCESSES .

11 of 101
3. PRESENTATION

WHAT IS MICROSOFT POWERPOINT?

Microsoft PowerPoint is a presentation software developed by Microsoft. It is


part of the Microsoft Office suite of productivity software and is widely used in
business, education, and other fields to create professional-looking
presentations. PowerPoint allows users to create slides that can contain text,
images, audio, video, charts, and graphs, and can be displayed in a sequential
order to communicate information to an audience. The software provides
various formatting tools, animations, and transitions that allow users to create
engaging and dynamic presentations. PowerPoint also supports collaboration,
allowing multiple users to work on the same presentation simultaneously and
providing tools for reviewing and commenting on each other's work. The
software is available for both Windows and Mac operating systems.

FEATURES OF MS. POWERPOINT:

1. Slide creation: PowerPoint allows users to create slides with text, images,
audio, video, charts, and graphs.
2. Design tools: The software offers a variety of design tools, such as themes,
color schemes, and fonts, to help users create professional-looking slides.
3. Animations and transitions: PowerPoint provides animations and
transitions that can be applied to elements on a slide to add movement
and visual interest.

STEPS TO OPEN MS. POWERPOINT: -

1. To open Microsoft PowerPoint, follow these steps:


2. Click on the "Start" button located in the bottom left corner of your screen.
3. Type "PowerPoint" in the search box located at the bottom of the Start menu.
4. Click on the "Microsoft PowerPoint" application that appears in the search results.
12 of 101
5. Wait for the PowerPoint application to launch, which may take a few seconds
depending on the speed of your computer.

TITLE 1: TO PREPARE A POWER-POINT PRESENTATION:

1. Open Microsoft PowerPoint.


2. Choose a design template for your presentation. PowerPoint provides a variety of
templates to choose from or you can choose a blank slide to start from scratch.
3. Add a title slide by clicking on "New Slide" in the "Home" tab, then selecting the
"Title Slide" option.
4. Add content to your presentation by clicking on "New Slide" in the "Home" tab,
then selecting the slide layout that best fits your content.
5. Add text to your slides by clicking on the text box and typing in your content. You
can change the font, size, and color of the text by using the options in the "Home"
tab.
6. Add images, charts, or other media to your presentation by clicking on the "Insert"
tab and selecting the type of media you want to add. You can also add animations
or transitions to your slides by using the options in the "Animations" and
"Transitions" tabs.
7. Preview your presentation by clicking on the "Slide Show" tab and selecting "From
Beginning" to start the presentation from the beginning, or "From Current Slide" to
start from the current slide.
8. Save your presentation by clicking on "File" in the top left corner and selecting
"Save As." Choose a location to save your presentation and give it a name, then
click "Save."

OUTPUT:

13 of 101
14 of 101
15 of 101
TITLE 2: TO PREPARE A CHAPTER PRESENTATION:

16 of 101
4. WEB PAGE DESIGNING

17 of 101
HTML STANDS FOR HYPERTEXT MARKUP LANGUAGE. IT IS THE STANDARD
MARKUP LANGUAGE USED TO CREATE WEB PAGES AND WEB APPLICATIONS.
HTML CONSISTS OF A SERIES OF TAGS AND ATTRIBUTES THAT DESCRIBE THE
STRUCTURE AND CONTENT OF A WEB PAGE.
HTML documents are made up of two main parts: the head and the body. The
head contains information about the document, such as the title and meta
information. The body contains the content of the web page, which can
include text, images, videos, links, and more.
HTML is used in combination with other technologies such as Cascading Style
Sheets (CSS) and JavaScript to create interactive and visually appealing web
pages. CSS is used to style the content of a web page, while JavaScript is used
to add interactivity and functionality to the page.
HTML has evolved over the years, with new versions being released
periodically. The current version of HTML is HTML5, which provides a wide
range of new features and improvements over previous versions.

STEPS TO OPEN HTML:

1. To open an HTML file on your computer, follow these steps:

18 of 101
2. Open a web browser such as Google Chrome, Mozilla Firefox, Microsoft
Edge, or Safari.
3. Click on the "File" menu in the top left corner of the browser window.
4. Select "Open File" or "Open File..." from the drop-down menu. This will
open a file dialog box.
5. Browse to the location where your HTML file is saved on your computer.
6. Select the HTML file you want to open and click the "Open" button or
double-click on the file. The HTML file will be opened in the browser
window.

19 of 101
TITLE 1: TO PREPARE
HEADING TAG USING
HTML
IN HTML, HEADING TAGS ARE USED TO DEFINE HEADINGS AND SUBHEADINGS ON A WEB
PAGE. There are six levels of heading tags in HTML, from <h1> (the largest
heading) to <h6> (the smallest heading).
CODE:
<html>

<head>

<title> Heading tags </title>

</head>

<body bgcolor=blue>

<h1> Shusam koirala </h1>

<h2> Shusam koirala </h2>

<h3> Shusam koirala </h3>

<h4> Shusam koirala </h4>

<h5> Shusam koirala </h5>

<h6> Shusam koirala </h6>

</body>

</html>

20 of 101
OUTPUT:

21 of 101
TITLE 2: TO PREPARE TEXT
FORMATTING USING HTML
IN HTML, YOU CAN USE A VARIETY OF TAGS AND
ATTRIBUTES TO FORMAT TEXT ON A WEB PAGE. HERE
ARE A FEW EXAMPLES:
CODE:
<html>
<head>
<title> Text formatting tags </title>
</head>
<body>
<b>Bold Shusam</b>
<i>Italic Shusam</i>
<u>Underlined Shusam</u>
<s>Strikethrough Shusam</s>
<strike>Strikethrough Shusam2</strike>
</body>
</html>

22 of 101
Output:
Bold Shusam Italic Shusam Underlined Shusam Strikethrough Shusam2

Bold Shusam Italic Shusam Underlined Shusam Strikethrough Shusam2

TITLE 3: TO PREPARE FONT


TAG USING HTML

THE <FONT> TAG IS AN OLDER HTML TAG THAT WAS USED TO CHANGE THE FONT , SIZE,
AND COLOR OF TEXT . While this tag is still supported by modern web
browsers, it is considered deprecated and should not be used in new
web development projects. Instead, it is recommended to use CSS to
style the text on your web pages.
However, for reference, here is an example of how to use the <font>
tag to change the font, size, and color of text:
CODE:
<html><head>
<title> Font tag </title></head>
<body bgcolor=black>
<font face="Arial" size="4" color="blue">This text will be blue, in the Arial
font, and size 4</font></body></html>
OUTPUT:
23 of 101
TITLE 4: TO INSERT AN
IMAGE IN HTML
To insert an image in HTML, follow these steps:
1. Open a text editor such as Notepad or Visual Studio Code.
2. Create an HTML file and save it with the .html extension.
3. In the HTML file, locate the place where you want to insert the image.
4. Use the following HTML code to insert the image:

<IMG SRC="IMAGE_FILE_PATH.JPG" ALT="IMAGE_DESCRIPTION">


CODE:
<html><head>
<title> Image tag </title></head>
<body>
<img src=" https://encrypted-
tbn2.gstatic.com/images?q=tbn:ANd9GcSKKk7JnFYz5klmzyIchorZY0y9dgkf63c
_ppcmXImMTMlJIfhD "></body></html>
OUTPUT:

24 of 101
TITLE 5: TO INSERT
AUDIO/VIDEO IN HTML
To insert audio or video in HTML, you can use the <audio> and <video>
elements respectively. Here are the steps:
1. Open a text editor such as Notepad or Visual Studio Code.
2. Create an HTML file and save it with the .html extension.
3. In the HTML file, locate the place where you want to insert the audio or
video.
4. Use the following HTML code to insert audio:
<AUDIO SRC ="AUDIO_FILE_PATH.MP3" CONTROLS></AUDIO>
CODE:
<html>
<head>
<title> Audio tag </title>
</head><body>

25 of 101
<audio src="harihariodhani_pawansingh.mp3" controls></audio>
</body></html>
OUTPUT:

Use the following HTML code to insert video:


<VIDEO SRC ="VIDEO_FILE_PATH.MP4" CONTROLS></VIDEO>

CODE:
<html>
<head>
<title> Video tag</title>
</head>
<body>
<video src="I Ima.M4V" controls></video>
</body>
</html>
Output:
26 of 101
TITLE 6: TO INSERT
HYPERLINK IN HTML

HYPERLINKS IN HTML ARE USED TO CREATE CLICKABLE LINKS THAT TAKE YOU TO ANOTHER
WEBPAGE, DOCUMENT , OR RESOURCE.

Here are the steps to create a hyperlink in HTML:


1. Open a text editor such as Notepad or Visual Studio Code.
2. Create an HTML file and save it with the .html extension.
3. In the HTML file, locate the place where you want to insert the hyperlink.
4. Use the following HTML code to create a hyperlink:

<A HREF="HTTPS://WWW.EXAMPLE.COM">LINK TEXT</A>


CODE:

<html>
<head>
<title>Hyperlink tag</title>
27 of 101
</head>
<body>
<a href="www.messenger.com">Open Messenger</a>
</body>
</html>
OUTPUT:

28 of 101
29 of 101
TITLE 7: TO INSERT TABLE
IN HTML
TABLES IN HTML ARE USED TO DISPLAY DATA IN A TABULAR FORMAT.
1. Create an HTML file and save it with the .html extension.
2. In the HTML file, use the following HTML code to create a table:

30 of 101
CODE:
<html>
<head>
<title>Table tag</title>
</head>
<body>
<table>
<tr>
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
</tr> <tr>
<td>Row 1, Column 1</td>
<td>Row 1, Column 2</td>
<td>Row 1, Column 3</td>
</tr> <tr>
<td>Row 2, Column 1</td>
<td>Row 2, Column 2</td>
<td>Row 2, Column 3</td>
</tr>
</table> </body> </html>
OUTPUT:

31 of 101
TITLE 8: TO USE LIST TAG
IN HTML
IN HTML, YOU CAN CREATE ORDERED AND UNORDERED LISTS USING THE <UL> AND <OL>
TAGS, RESPECTIVELY .

Here's an example of how to use the list tags in HTML:

In this example, we use the <ul> tag to create an unordered list and the <li>
tag to define each list item. The result will be a bulleted list that looks like this:

• Item 1
32 of 101
• Item 2
• Item 3

In this example, we use the <ol> tag to create an ordered list and the <li> tag
to define each list item. The result will be a numbered list that looks like this:
1. Item 1
2. Item 2
3. Item 3

In HTML, you can use the <dl>, <dt>, and <dd> tags to create a description list.
A description list is a list of terms and their corresponding descriptions. Here's
an example of how to use the description list tags in HTML:

33 of 101
OUTPUT:

34 of 101
TITLE 9: TO USE FORM TAG
IN HTML
THE <FORM> TAG IN HTML IS USED TO CREATE A FORM THAT ALLOWS USERS TO INPUT
DATA AND SUBMIT IT TO A SERVER FOR PROCESSING .

Here's an example of how to use the <form> tag in HTML:

In this example, we have an ordered list (<ol>) with three items, an unordered
list (<ul>) with three items, and a description list (<dl>).

35 of 101
CODE:

OUTPUT:

36 of 101
TITLE 10: CSS AND ITS
TYPES
CSS (CASCADING STYLE SHEETS) IS A LANGUAGE USED TO DESCRIBE THE PRESENTATION OF
HTML AND XML DOCUMENTS .
1. INLINE CSS: Inline CSS is a type of CSS that is applied directly to an HTML
element using the style attribute. Inline styles take the highest priority
and override any other styles applied to the element.

2. INTERNAL CSS: Internal CSS is a type of CSS that is included in the <head>
section of an HTML document. It is enclosed in <style> tags and applies
styles to elements within the document.

37 of 101
3. EXTERNAL CSS: External CSS is a type of CSS that is stored in a separate
file with a .css extension. The file is linked to the HTML document using
the <link> element.

CODE:

38 of 101
In this example, we have applied CSS styles to a heading using all three types
of CSS: inline CSS, internal CSS, and external CSS.
OUTPUT:

39 of 101
The first heading uses inline CSS to add a blue border to the bottom of the
heading.
The second heading uses internal CSS to change the color and font size of the
heading.
The third heading uses external CSS, which is stored in a separate styles.css
file and linked to the HTML document using the <link> element. The heading-
style class is applied to the heading, which applies the styles defined in the
external CSS file.
HERE'S WHAT THE CORRESPONDING STYLES .CSS FILE MIGHT LOOK LIKE :

5. C PROGRAMMING

40 of 101
C IS A HIGH-LEVEL, GENERAL-PURPOSE PROGRAMMING LANGUAGE THAT WAS ORIGINALLY
DEVELOPED IN THE EARLY 1970S BY DENNIS RITCHIE AT BELL LABS. C PROGRAMMING IS
THE PROCESS OF WRITING , COMPILING, AND DEBUGGING PROGRAMS IN THE C
PROGRAMMING LANGUAGE .

Here are some advantages of C programming language:


1. EFFICIENCY: C is a high-performance language that is optimized for efficient
memory usage and fast execution, making it suitable for systems programming and
other computationally intensive tasks.
2. PORTABILITY: C programs are generally portable across different platforms and
operating systems, making it possible to write code that can run on a wide range of
hardware and software environments.
3. FLEXIBILITY: C provides low-level access to hardware and memory, allowing
developers to write code that is highly optimized and customizable for specific
tasks.
4. RICH SET OF LIBRARIES: C has a vast library of pre-built functions and data types
that can be used to perform a wide range of tasks, from basic input/output
operations to advanced mathematical and scientific computations.
5. COMPATIBILITY: C is widely used in the development of operating systems,
compilers, and other low-level software components, making it a popular choice
for system-level programming.

SIMPLE C PROGRAM:

41 of 101
When you compile and run this program, it should output the following
message to the console:

I/O FUNCTIONS IN C:
In C programming, input/output (I/O) functions are used to read input from
the user or a file, and to write output to the screen or a file. Here are some
commonly used I/O functions in C:

1. PRINTF(): This function is used to print output to the console or screen. It


takes a format string as input, which can include placeholders for
variables or other data that will be printed to the screen. For example,
printf("Hello, world!"); will print the string "Hello, world!" to the
console.
2. SCANF(): This function is used to read input from the user or a file. It
takes a format string as input, which specifies the types of variables that
42 of 101
will be read in. For example, scanf("%d", &num); will read an integer
from the user and store it in the variable num.
3. GETCHAR(): This function is used to read a single character from the user
or a file. It can be used to read input one character at a time, rather than
reading in an entire line at once.
4. FGETS(): This function is used to read a line of text from the user or a file.
It takes two arguments: a pointer to a character array where the input
will be stored, and the maximum number of characters that can be read
in.

These are just a few of the many input/output functions available in C. The
specific function to use depends on the task at hand and the format of the
input or output.

IF STATEMENT:
In C, the if statement is a conditional statement that is used to execute a block
of code if a particular condition is true. Here's the basic syntax of the if
statement:

If the condition is true, the code inside the curly braces will be executed. If
the condition is false, the code inside the curly braces will be skipped.

43 of 101
SIMPLE C PROGRAM TO DETERMINE IF THE INPUT NUMBER IS EVEN OR
ODD:

Result:

IF … ELSE STATEMENT:
In C programming, the if else statement is used to execute a block of code if a
certain condition is true, and execute another block of code if the same
condition is false. Here's the general syntax of an if else statement in C:

44 of 101
The condition can be any expression that evaluates to a Boolean value (i.e.,
true or false). If the condition is true, the code inside the first block (between
the curly braces {}) is executed, and if the condition is false, the code inside
the second block (also between curly braces {}) is executed.

For example, consider the following code that checks if a given number is
positive, negative or zero using if else statement:

45 of 101
Result:

46 of 101
IF … ELSE IF STATEMENT :
In C programming language, the if-else-if statement is used when you need to
test multiple conditions and perform different actions based on the condition
that is true. The syntax of the if-else-if statement is as follows:

Here, condition1, condition2, condition3, and so on are the expressions that


are evaluated to either true or false. If condition1 is true, then the code inside
the first if block is executed, and the program skips the remaining else-if
blocks.

If condition1 is false and condition2 is true, then the code inside the second
else-if block is executed, and so on.
47 of 101
PROGRAM TO DETERMINE THE GRADE OF THE STUDENT :

48 of 101
Result:

49 of 101
NESTED IF ELSE STATEMENT :
In C programming language, the nested if-else statement is used to test
multiple conditions where one or more of the conditions are dependent on
the result of a previous condition. The syntax of the nested if-else statement is
as follows:

The nested if-else statement is useful when you need to test multiple
conditions that are dependent on each other. It allows you to write more
complex and precise conditional logic in your program.

50 of 101
PROGRAM TO CALCULATE RIZZ LEVEL USING NESTED IF ELSE STATEMENT :

Result:
51 of 101
SWITCH CASE STATEMENT:

In C programming, the switch statement is a branching statement


that allows you to select from several possible options based on the
value of an expression. The basic syntax of a switch statement is as
follows:

52 of 101
53 of 101
SWITCH CASE STATEMENT 1ST EXAMPLE:

Here's an example program that uses a switch statement to


determine the day of the week based on a user input:

54 of 101
55 of 101
SWITCH CASE STATEMENT 2 ND EXAMPLE:
Here's an example program that uses a switch statement to perform different
actions based on the user's input:

56 of 101
Output:
57 of 101
In all three examples, the program prompts the user to enter a choice
between 1 and 3. The program uses a switch statement to check which case
matches the user's input, and outputs the corresponding message. Finally, the
program ends by returning 0.

58 of 101
SWITCH CASE STATEMENT 3 RD EXAMPLE:
Here's another example program that uses a switch statement:

59 of 101
Output:

In this example, the user entered the number 3, so the program output "You
chose Orange.".

60 of 101
In this example, the user entered the number 5, which is not one of the valid
options. The program outputs "Invalid choice." to indicate that the user made
an invalid input.

FOR LOOP:

In C, a for loop is a control flow statement that allows you to repeat a block of
code a fixed number of times. The syntax of a for loop is as follows:

Here's what each part of the for-loop syntax means:

• initialization is an expression that sets the initial value of the loop


control variable. This expression is only executed once, before the loop
starts.
• condition is a Boolean expression that is tested at the beginning of each
iteration of the loop. If the condition is true, the loop continues; if it's
false, the loop terminates.
• increment/decrement is an expression that updates the loop control
variable after each iteration of the loop. This expression is executed at
the end of each iteration, just before the condition is tested again.

61 of 101
FOR LOOP 1ST EXAMPLE:

Here's an example of a for loop that prints the numbers from 1 to 10:

62 of 101
In this example, the loop control variable i is initialized to 1, and the loop
continues as long as i is less than or equal to 10. After each iteration of the
loop, the value of I is incremented by 1. The printf statement inside the loop
prints the value of i on each iteration, separated by a space. The output of this
program is:

Output:

63 of 101
FOR LOOP 2ND EXAMPLE:

Here's another example of a for loop that calculates the sum of the first n
integers, where n is entered by the user:

Output:

9 IS MY ROLL NUMBER BTW ;)

64 of 101
FOR LOOP 3RD EXAMPLE:
Here's another example of a for loop that prints the multiplication table of a number entered by the
user:

Output:

65 of 101
WHILE LOOP:

A while loop is a type of loop in C programming that allows you to repeatedly


execute a block of code while a certain condition is true. Here's the basic
syntax for a while loop in C:

The condition in the parentheses is evaluated at the beginning of each


iteration of the loop. If the condition is true, the code inside the loop is
executed; otherwise, the loop is exited, and control passes to the code that
comes after the loop.
WHILE LOOP 1ST EXAMPLE:

66 of 101
Output:

67 of 101
IN THIS PROGRAM , WE INITIALIZE TWO VARIABLES : COUNT TO KEEP
TRACK OF HOW MANY EVEN INTEGERS WE HAVE PRINTED SO FAR ,
AND NUM TO KEEP TRACK OF THE CURRENT EVEN INTEGER THAT
WE ARE PRINTING .

WHILE LOOP 2ND EXAMPLE:

Here's another example program that uses a while loop to read


integers from the user until a negative integer is entered, and
then calculates and prints the average of the positive integers
that were entered:

Output:
68 of 101
WHILE LOOP 3RD EXAMPLE:

Printing my name until n times

69 of 101
Output:

DO-WHILE LOOP :

A do-while loop is similar to a while loop, but the difference is that a do-while
loop guarantees that the loop body will be executed at least once, regardless
of the loop condition.

DO-WHILE LOOP 1ST EXAMPLE:

IN THIS PROGRAM, WE INITIALIZE A VARIABLE I TO 1 AND USE A DO-WHILE LOOP TO PRINT


THE VALUE OF I AND INCREMENT IT UNTIL IT REACHES 10.
INSIDE THE LOOP , WE PRINT THE VALUE OF I USING THE %D FORMAT SPECIFIER AND THEN

70 of 101
INCREMENT I BY 1. THE LOOP CONDITION IS
CHECKED AT THE END OF EACH ITERATION ,
SO THE LOOP BODY IS GUARANTEED TO BE
EXECUTED AT LEAST ONCE .

Output:

DO-WHILE LOOP 2ND EXAMPLE:

Here's an example program that uses a do-while loop to prompt the user to
enter a number between 1 and 10, and then prints the square of that number:

71 of 101
IN THIS PROGRAM, WE USE A DO-WHILE LOOP TO REPEATEDLY PROMPT THE USER TO
ENTER A NUMBER BETWEEN 1 AND 10 UNTIL THEY PROVIDE A VALID INPUT . INSIDE THE
LOOP, WE FIRST PROMPT THE USER TO ENTER A NUMBER USING THE PRINTF AND SCANF
FUNCTIONS , RESPECTIVELY . THEN WE USE AN IF STATEMENT TO CHECK IF THE INPUT
NUMBER IS OUTSIDE THE VALID RANGE OF 1 TO 10, AND IF SO, WE PRINT AN ERROR
MESSAGE AND REPEAT THE LOOP . THE LOOP CONDITION CHECKS WHETHER NUM IS LESS
THAN 1 OR GREATER THAN 10, AND IF SO, THE LOOP CONTINUES . ONCE THE USER ENTERS
A VALID INPUT , WE CALCULATE THE SQUARE OF THAT NUMBER AND PRINT IT USING THE
PRINTF FUNCTION .

Output:

72 of 101
DO-WHILE LOOP 3RD EXAMPLE:

73 of 101
Output:

BREAK STATEMENT :

In C, the break statement is used inside loops (such as for loop, while loop, or
do-while loop) and switch statements.

When used inside a loop, the break statement is used to immediately


terminate the loop and continue executing the statements after the loop.
When used inside a switch statement, the break statement is used to exit the

74 of 101
switch statement and continue executing the statements after the switch
statement.

BREAK STATEMENT EXAMPLE:

IN THIS PROGRAM , A FOR LOOP IS


USED TO PRINT THE VALUES OF I
FROM 1 TO 10.
INSIDE THE LOOP BODY , THERE IS
AN IF STATEMENT THAT CHECKS IF
THE VALUE OF I IS EQUAL TO 5.

Output:

CONTINUE STATEMENT :

In C, the continue statement is used inside loops (such as for loop, while loop,
or do-while loop) to skip the current iteration of the loop and continue with
the next iteration.
75 of 101
CONTINUE STATEMENT EXAMPLE :

Output:

76 of 101
GOTO STATEMENT :

In C, the goto statement is a control statement that allows you to transfer the
control of the program to a labeled statement anywhere in the program. The
goto statement is usually discouraged in modern programming practices, as it
can lead to spaghetti code. GOTO STATEMENT EXAMPLE :

Output:

77 of 101
ARRAY
In C programming, an array is a collection of elements of the same data type, stored in
contiguous memory locations, and identified by a common name. An array can be a one-
dimensional or multidimensional array.

Arrays are often used in algorithms and programming because they provide a way to
access and manipulate a collection of data efficiently. Elements in an array can be
accessed using their index.

Arrays can be either one-dimensional or multi-dimensional. A one-dimensional array is a


simple list of elements, while a multi-dimensional array is an array of arrays, where each
element in the array is itself an array. For example, a two-dimensional array could
represent a table of data, where each row is an array of values.

78 of 101
ARRAY EXAMPLE 1:

In this example, we declare and initialize an array of integers called numbers with 5
elements. We then access the second element of the array using its index (which is 1,
since arrays in C are 0-indexed), and store its value in the variable second_number. Next,
we modify the value of the third element of the array (which has index 2) to 35.

OUTPUT:

79 of 101
ARRAY EXAMPLE 2:

In this example, we declare and initialize an array of integers called scores with 4
elements, representing the scores of a student in four different subjects. We then print
the student's name, section, and roll number using printf().

OUTPUT:

80 of 101
ARRAY EXAMPLE 3:

81 of 101
In this example, we declare and initialize a 2D array or matrix of integers
called matrix with 3 rows and 3 columns. We then print the contents of the
matrix using two nested for loops that iterate over each element of the matrix
and print its value.

OUTPUT:

82 of 101
ARRAY EXAMPLE 3:

ARRAY EXAMPLE 4:

83 of 101
In this example, we define two matri

ces of size 3x3 and initialize them with some values. We then define a result
matrix of size 3x3 and initialize it to all zeroes.

We then perform matrix addition on matrix1 and matrix2 using two nested for
loops. The outer two loops iterate over each element of the result matrix, and
the inner loop adds the corresponding elements of matrix1 and matrix2.

84 of 101
ARRAY EXAMPLE 5:

85 of 101
OUTPUT:

ARRAY EXAMPLE 6:

86 of 101
87 of 101
88 of 101
89 of 101
OUTPUT:

90 of 101
91 of 101
STRING FUNCTION
In computer programming, a string function is a function or method that
operates on a string or a sequence of characters.
1. LEN (): RETURNS THE LENGTH OF THE STRING
2. UPPER(): CONVERTS ALL CHARACTERS IN THE STRING TO UPPERCASE
3. LOWER(): CONVERTS ALL CHARACTERS IN THE STRING TO LOWERCASE
4. STRIP(): REMOVES LEADING AND TRAILING WHITESPACE CHARACTERS FROM THE STRING
5. REPLACE (): REPLACES A SPECIFIED SUBSTRING WITH ANOTHER SUBSTRING IN THE STRING
6. SPLIT (): SPLITS THE STRING INTO A LIST OF SUBSTRINGS BASED ON A DELIMITER
7. JOIN (): JOINS A SEQUENCE OF STRINGS INTO A SINGLE STRING , USING A SPECIFIED DELIMITER
8. FIND (): RETURNS THE INDEX OF THE FIRST OCCURRENCE OF A SPECIFIED SUBSTRING IN THE STRING
9. COUNT (): RETURNS THE NUMBER OF OCCURRENCES OF A SPECIFIED SUBSTRING IN THE STRING

92 of 101
STRING EXAMPLE 1:

OUTPUT:

93 of 101
STRING EXAMPLE 2:

STRING EXAMPLE 3:

94 of 101
Above example is like as the replacing a with o ;)

95 of 101
STRING EXAMPLE 4:

96 of 101
STRING EXAMPLE 5:

strlwr() is a string function in C that converts a given string to lowercase. It is a


part of the string.h header file.

THE SYNTAX OF STRLWR() FUNCTION IS:

97 of 101
STRING EXAMPLE 6:

OUTPUT:

98 of 101
STRING EXAMPLE 7:

99 of 101
CONCLUSION:
BY PREPARING THIS PROJECT I CAME TO KNOW ABOUT DIFFERENT

TOPICS LIKE WORD PROCESSING, MS-EXCEL, MS-POWER-POINT,

AND WEBPAGE DESIGNING. I LEARNT THE DIFFERENT FEATURES

OF WORD, EXCEL AND WEBPAGE DESIGNING. USING WORD, I

LEARNT TO PREPARE MY BIODATA, PREPARE DIFFERENT

MATHEMATICAL SYMBOLS AND PREPARE THE CERTIFICATE AND ID

CARD. I ALSO LEARNT TO MAIL MERGE. USING EXCEL, I LEARNT TO

PREPARE MARK-SHEET, SALARY-SHEET, SALES RECORDS, AND PIE

CHART ALONG WITH BAR GRAPH. I ALSO LEARNT TO PREPARE THE

POWER-POINT PRESENTATION. I ALSO LEARNT TO PREPARE THE

WEB PAGE. I CAME TO KNOW ABOUT THE DIFFERENT FACILITIES

PROVIDED BY WEBPAGE DESIGNING. I FELT VERY GLAD WHILE

PREPARING THIS REPORT.

BIBLIOGRAPHY:
DANGI, ROSHAN (2022), A TEXTBOOK OF COMPUTER SCIENCE-XI,
HERITAGE PUBLICATION

100 of 101
WEB REFERENCES:
1. HTTPS://WWW.GOOGLE.COM/
2. HTTPS://WWW.WIKIPEDIA.ORG/
3. HTTPS://W3SCHOOLS.CO/

101 of 101

You might also like