You are on page 1of 26

AGRA PUBLIC GROUP

OF INSTITUTION

PRACTICAL FILE FOR


FOC , C , HTML

BCA

FIRST YEAR (SESSION : 2022-2023)

SUBMITTED BY: SUBMITTED TO:

DHEERAJ VARLANI MR. VINEET


MISS. MEGHA

Content
Serial no. Topic Signature.
*01. Write a flowchart to find the largest number
among three given numbers.
*02. Write a flowchart to check whether the
number is even or odd.
*03. Demonstrate the following DOS commands:
to view the contents of a directory, Change
from one directory to another, Create and
delete directories, Change from one drive to
another, Copy files,Rename files, Delete files,
Format a floppy disk.
*04. Demonstrate the steps of mail merge in MS
Word.
*05. WAP to print prime numbers up to 1 to n.s

*06. WAP to calculate the factorial of a given


number.
*07. WAP to find the largest number among three
given numbers.
*08. WAP to search a number in an array.

*09. WAP to perform the addition of two matrices.

*10. WAP to perform the addition of two matrices.

*11. WAP to swap two given numbers by using


function as call by reference.
*12. WAP to demonstrate file handling functions
to open and close a file.
*13. WAP to demonstrate the use of structure in
C.
*14. WAP to demonstrate headings and
paragraphs in HTML.
*15. WAP to create all lists (ordered and
unordered) in HTML. Also Add the
functionality of hyperlinks.
*16. WAP to insert images and tables in HTML.

*17. WAP to create forms using the various form


elements in HTML.
*18. 20-WAP to demonstrate the use of CSS with
HTML.

/PROGRAM #01/ - Write a flowchart to find the largest number among three
given numbers.
Answer.
.

/PROGRAM #02\
Write a flowchart to check whether the number is even or odd.
Answer.
/PROGRAM #03 - Demonstrate the following DOS commands.
Answer:
1. To view the content of the directory.
Dir /directory name

2. Change from one directory to another.


cd command is used to change directory

3. Create and Delete directory.


md is used to create directory

rmdir is used to delete directory

4. Change from one drive to another.


Drive name: is used to change drive

5. Copy file.

6. Rename files.
rename filename1 filename2
7. Delete File.
del filename to delete file
8. Format floppy disk.
C:\> format disk name to delete
/PROGRAM #04- Demonstrate the steps of mail merge in MS Word.

Answer:
1. Click the Mailings tab.
2. Click the Start Mail Merge button.
3. Select Step-by-Step Mail Merge Wizard.

The Mail Merge pane appears on the right, ready to walk you through the mail merge.

4. Select a type of document to create.

5. Click Next: Starting document.


/PROGRAM #05 - WAP to print prime numbers up to 1 to n.
Answer:

OUTPUT--
/PROGRAM #06 - WAP to calculate the factorial of a given number.
Answer:

OUTPUT—

/PROGRAM #07 - WAP to find the largest number among three given
numbers.
Answe
OUTPUT-

/PROGRAM #08 -Wap to calculate the factorial of a given number.

Answer:

OUTPUT;

:
/PROGRAM #09 - Wap to perform the addition of two matrices.

A n sw er .

OUTPUT:

/PROGRAM #10\: Wap to generate Fibonacci series using functions.


Answer:
OUTPUT--
/PROGRAM #11/ - Wap a swap two given numbers by using function as call by
reference.
Answer;

OUTPUT--
/PROGRAM #12/ - Wap to demonstrate file handling function to open and close a file.
A n sw er :

OUTPUT--
/PROGRAM #13/: Wap to demonstrate the use of structure in c.
Answer:
Define Structures

Before you can create structure variables, you need to define its data type. To define a struct,
the struct keyword is used.

Syntax of struct

struct structureName

{ dataType member1;

dataType member2;

...

};

For example,

struct Person

{ char

name[50]; int

citNo;

float salary;

};

Here, a derived type struct Person is defined. Now, you can create variables of this type.

Create struct Variables

When a struct type is declared, no storage or memory is allocated. To allocate memory of a given
structure type and work with it, we need to create variables.

Here's how we create structure variables:

struct Person {

// code

};

int main() {

struct Person person1, person2, p[20];


return 0;

Another way of creating a struct variable is:

struct Person {

// code

} person1, person2, p[20];

In both cases,

person1 and person2 are struct Person variables

p[] is a struct Person array of size

20. Access Members of a Structure

There are two types of operators used for accessing members of a structure.

. - Member operator

-> - Structure pointer operator (will be discussed in the next tutorial)

Suppose, you want to access the salary of person2. Here's how you can do it.
person2.salary

Example 1: C structs

#include <stdio.h>

#include <string.h>

// create struct with person1 variable

struct Person {

char name[50];

int citNo;

float salary;

} person1;

int main() {

// assign value to name of person1

strcpy(person1.name, "George Orwell");

// assign values to other person1

variables person1.citNo = 1984;

person1. salary = 2500;

// print struct variables

printf("Name: %s\n", person1.name);

printf("Citizenship No.: %d\n", person1.citNo);


printf("Salary: %.2f", person1.salary);

return 0;

Output:

Name: George Orwell

Citizenship No.: 1984

Salary: 2500.00

In this program, we have created a struct named Person. We have also created a
variable of Person named person1.

In main(), we have assigned values to the variables defined in Person for the
person1 object.

strcpy(person1.name, "George Orwell");

person1.citNo = 1984;

person1. salary = 2500;

Notice that we have used strcpy() function to assign the value to person1.name.

This is because name is a char array (C-string) and we cannot use the assignment
operator = with it after we have declared the string.

Finally, we printed the data of person1.


/PROGRAM #14/ - Wap to demonstrate headings and paragraphs in html.
Answer-
What is an HTML Heading?
An HTML heading is a title or subheading that we want to display on a webpage. In HTML, there are six
headings defined using <h1> to <h6> tags. h1 is the highest level or the main heading, while h6 is the least
important.

The text inside the heading tags <h1>TEXT</h1> shows on the browser. The size of the text depends on
the heading tag.

HTML Headings Syntax:

<h1>TEXT</h1>

What HTML Heading Tags

The following are the six HTML tags for different heading sizes-

<h1>Heading 1</h1> - (Most Important)

<h2>Heading 2</h2>

<h3>Heading 3</h3>

<h4>Heading 4</h4>

<h5>Heading 5</h5>

<h6>Heading 6</h6> - (Least Important)

Here is a simple example in HTML to display the H1 through H6 headings on a web page:

OUTPUT--
What is an HTML Paragraph?
Paragraphs tags or <p> tags in HTML help us create paragraphs on a web page. On web browsers,
paragraphs display as blocks of text separated from adjacent blocks by blank lines, white spaces, or first-line
indentation.

You can use a <p> tag followed by the content you want to display in your paragraph and a </p>. Whenever
the web browser comes across a <p> tag, it starts its contents on a new line.

HTML Paragraph Syntax:

<p>Paragraph Content</p>

Paragraphs tags or <p> tags in HTML help us create paragraphs on a web page. On web browsers, paragraphs
display as blocks of text separated from adjacent blocks by blank lines, white spaces, o first-line
indentation.

You can use a <p> tag followed by the content you want to display in your paragraph and a </p>.
Whenever the web browser comes across a <p> tag, it starts its contents on a new line.

HTML Paragraph Syntax:

INPUT:

Output:
/PROGRAM #15\: Wap to create all lists (ordered and unordered ) in html.
Also add the functionality of hyperlinks.
Answer:

Output:
/PROGRAM #16\: Wap to inserts images and tables in html.
Answer:

Output:
/PROGRAM #17- wap to create forms using the various form elements in
html.

Answer:

OUTPUT:
/PROGRAM #18/ - WAP to demonstrate the use of CSS with HTML.

Answer:

OUTPUT:

You might also like