Print Ready 1000
Print Ready 1000
SUBJECT: CS (4282)
Project Work On
1. MS-ACCESS
2. C-Language
3. JavaScript
4. PHP
5. Power Point
Submitted by:
Name : Samadhi Raj Bajracharya
Registration No : 813250040111
For the partial fulfillment of the requirement for Grade 12 Computer Science
course design by NEB.
Balkumari, Lalitpur
2024/2025 AD
Acknowledgement
This project was developed as a partial fulfillment of the Grade 12
Computer Science curriculum, as prescribed by the National Examinations
Board (NEB). It encompasses various aspects of several programming and
application tools, including:
• Microsoft Access: Database creation, table design, relationship
establishment, query development, form creation, and report
generation.
• C Programming: User-defined functions, structures, file handling,
and pointers.
• JavaScript: Conditional statements (if, if-else), loops (for, while, do-
while), functions, arrays, and form connectivity.
• PHP: Conditional statements, loops, arrays, database connectivity,
and server-side query execution.
• Microsoft PowerPoint: Animation, hyperlinks, slide duplication,
and shape drawing.
•
SUBJECT: CS (4282)
Lab 1
Creating Tables And Designing Queries
(MS-Access).
Submitted to:
Submitted by:
Name : Samadhi Raj Bajracharya
Registration No : 813250040111
Kapil Sharma
(Computer Instructor)
For the partial fulfillment of the requirement for Grade 12 Computer Science
course design by NEB.
Balkumari, Lalitpur
2024/2025 AD
About MS-Access
Microsoft Access is a relational database management system
(RDBMS) developed by Microsoft. It is part of the Microsoft 365
suite and is used for creating, managing, and analyzing databases.
Designing the select query to display the records of Male students only
Designing the select query to display the records of Female students only
Designing the select query to display the records of students who scored above 70%
Designing the select query to display the records of students who scored less than 70%
CONCLUSION
SUBJECT: CS (4282)
Lab 2
Creating One To Many Relationships and Form With Button
(MS-Access).
Submitted to:
Submitted by:
Name : Samadhi Raj Bajracharya
Registration No : 813250040111
Kapil Sharma
(Computer Instructor)
For the partial fulfillment of the requirement for Grade 12 Computer Science
course design by NEB.
Balkumari, Lalitpur
2024/2025 AD
TABLE: Student Detail
Two Queries
STUDENT FORM
REPORT
Conclusion:
From the above practical I came to know how to
create database table,store data into the table,
create relationship between tables,create form
with buttons and make report of data using MS
Access as a database software.
MILESTONE INTERNATIONAL SECONDARY SCHOOL
SUBJECT: CS (4282)
Lab 3
Structure
C-Programming).
Submitted to:
Submitted by:
Name : Samadhi Raj Bajracharya
Registration No : 813250040111
Kapil Sharma
(Computer Instructor)
For the partial fulfillment of the requirement for Grade 12 Computer Science
course design by NEB.
Balkumari, Lalitpur
2024/2025 AD
C Programming Overview
#include<stdio.h>
#include<string.h>
struct DOB
{
int year;
int month;
int day;
};
struct student
{
int rollNo;
char name[50];
char address[50];
int classes;
char gender[50];
char email[50];
struct DOB db;
}stu;
int main()
{
printf("\nEnter the detail of one student\n");
printf("\n_________________________________\n");
printf("\nEnter the name of the student\n");
scanf("%s",stu.name);
printf("\nEnter the roll no of student\n");
scanf("%d", &stu.rollNo);
printf("\nEnter the address of student\n");
scanf("%s", stu.address);
while(getchar()!='\n');
printf("\nEnter the classes of student\n");
scanf("%d",&stu.classes);
while(getchar()!='\n');
printf("\nEnter the gender of student\n");
scanf("%s",stu.gender);
while(getchar()!='\n');
printf("\nEnter the email of student\n");
scanf("%s",stu.email);
while(getchar()!='\n');
printf("\nEnter the DOB of one student\n");
printf("\n_________________________________\n");
printf("\nEnter the year\n");
scanf("%d",&stu.db.year);
printf("\nEnter month\n");
scanf("%d",&stu.db.month);
printf("\nEnter day\n");
scanf("%d",&stu.db.day);
#include <stdio.h>
#include <string.h>
int main() {
int rollno[5];
char name[5][60], address[5][60];
FILE *fp;
int i;
fp = fopen("D:\\info.txt", "w");
if (fp == NULL) {
perror("Error opening file for writing");
return 1;
}
fp = fopen("D:\\info.txt", "r");
if (fp == NULL) {
perror("Error opening file for reading");
return 1;
}
fclose(fp);
return 0;
}
Input/Output
Conclusion:
From the above practical I came to know how to
perform arithmetic operation using function and
switch case, find the factorial of first 10
integer using function and find the factorial of
a given number and calculate the sum of n number
using recursive technique.
MILESTONE INTERNATIONAL SECONDARY SCHOOL
SUBJECT: CS (4282)
Lab 4
File Handling
(C-Programming)
Submitted to:
Submitted by:
Name : Samadhi Raj Bajracharya
Registration No : 813250040111
Kapil Sharma
(Computer Instructor)
For the partial fulfillment of the requirement for Grade 12 Computer Science
course design by NEB.
Balkumari, Lalitpur
2024/2025 AD
WACP to enter roll, name and address of one student and
display it on the screen using structure variable.
Source Code:
#include<stdio.h>
#include<string.h>
struct student
{
int ID;
char name[50];
char address[50];
char grade[50];
}emp;
int main()
{
printf("\nEnter the name of the student\n");
scanf("%s", emp.name);
printf("\nEnter the id of %s\n", emp.name);
scanf("%d", &emp.ID);
while(getchar()!='\n');
printf("\nEnter the address of %s\n", emp.name);
scanf("%s", emp.address);
while(getchar()!='\n');
printf("\nEnter the grade of %s\n", emp.name);
scanf("%s", emp.grade);
while(getchar()!='\n');
printf("\nThe name of the student is %s\n", emp.name);
printf("\nThe ID of the %s is %d\n", emp.name, emp. ID);
printf("\nThe address of the %s is %s\n", emp.name,
emp.address);
printf("\nThe grade of the student is %s\n", emp.grade);
return 0;
}
Input/Output
WACP to store the information of 5 books
into. The file name “book.dat” and display
it on the screen after reading from the
file.
Source Code:
#include <stdio.h>
#include <string.h>
int main()
{
int bookid[5], i;
char bookname[5][60];
char authorname[5][60];
char publication[5][60];
int edition[5];
float price[5];
FILE *fp;
fp = fopen("D:\\book.dat", "w");
fp = fopen("D:\\book.dat", "r");
if (fp == NULL) {
perror("Error opening file for reading");
return 1;
}
SUBJECT: CS (4282)
Lab 5
User Defined Function
(C-Programming)
Submitted to:
Submitted by:
Name : Samadhi Raj Bajracharya
Registration No : 813250040111
Kapil Sharma
(Computer Instructor)
For the partial fulfillment of the requirement for Grade 12 Computer Science
course design by NEB.
Balkumari, Lalitpur
2024/2025 AD
WACP to perform arithematic operation using
function and switch case.
Source Code:
#include<stdio.h>
void sum(void);
void sub(void);
void multi(void);
void div(void);
int main()
{
x:
printf("Arithmetic Operation");
printf("\t\t\n_____________________");
printf("\t\t\n1.) Addition");
printf("\t\t\n2.) Subtraction");
printf("\t\t\n3.) Multiplication");
printf("\t\t\n4.) Division");
int ch;
printf("\nEnter Your Choice:");
scanf("%d",&ch);
switch(ch){
case 1:
sum();
break;
case 2:
sub();
break;
case 3:
multi();
break;
case 4:
div();
break;
default:
printf("Invalid.Re-enter");
goto x;
}
char b;
printf("\nDo you want to continue?.(if yes then press
y)\n");
scanf("%s",&b);
if(b=='Y'||b=='y') {
goto x;
}
return 0;
}
void sum(){
int m,n;
printf("Enter first number:");
scanf("%d",&m);
printf("Enter second number:");
scanf("%d",&n);
int add=m+n;
printf("The sum is %d",add);
}
void sub(){
int m,n;
printf("Enter first number:");
scanf("%d",&m);
printf("Enter second number:");
scanf("%d",&n);
int sub=m-n;
printf("The subtraction is %d",sub);
}
void multi(){
int m,n;
printf("Enter first number:");
scanf("%d",&m);
printf("Enter second number:");
scanf("%d",&n);
int multi=m*n;
printf("The multiplication is %d",multi);
}
void div(){
int m,n;
printf("Enter first number:");
scanf("%d",&m);
printf("Enter second number:");
scanf("%d",&n);
if(n==0){
printf("Cannot divide by zero.");
} else {
int div=m/n;
printf("The division is %d",div);
}
}
Input/Output
WACP to find the factorial of a first 10
integer number using function.
Source Code:
#include<stdio.h>
void fact(void);
int main(){
fact();
return 0;
}
void fact(){
int i,f=1;
for(i=1;i<=10;i++){
f=f*i;
printf("\n%d",f);
}
}
Input/Output
WACP to find the factorial of a given number
using recursive technique.
Source Code:
#include<stdio.h>
int factorial(int);
int main()
{
int n;
printf("Enter any number:");
scanf("%d",&n);
int k= factorial(n);
printf("The factorial of %d is %d",n,k);
return 0;
}
int factorial(int x){
int l;
if(x<=1)
return(1);
else
l = x*factorial(x-1);
return(l);
}
Input/Output
WACP to calculate the sum of n different
number using recursive technique.
Source Code:
#include<stdio.h>
int sum(int);
int main()
{
int n;
printf("Enter the range:");
scanf("%d",&n);
int k=sum(n);
printf("The sum is %d",k);
return 0;
}
int sum(int x){
int add,i;
if(x<=0)
return(0);
else
add=x+sum(x-1);
return(add);
}
Input/Output
Conclusion:
From the above practical I came to know how to
perform arithmetic operation using function and
switch case, find the factorial of first 10
integer using function and find the factorial of
a given number and calculate the sum of n number
using recursive technique.
MILESTONE INTERNATIONAL SECONDARY SCHOOL
SUBJECT: CS (4282)
Lab 6
Pointer
(C-Programming)
Submitted to:
Submitted by:
Name : Samadhi Raj Bajracharya
Registration No : 813250040111
Kapil Sharma
(Computer Instructor)
For the partial fulfillment of the requirement for Grade 12 Computer Science
course design by NEB.
Balkumari, Lalitpur
2024/2025 AD
WACP to display the largest number smong the
three different number using pointer.
Source Code:
#include<stdio.h>
int main()
{
int a,b,c,*ptr1,*ptr2,*ptr3;
printf("Enter first number:");
scanf("%d",&a);
printf("Enter second number:");
scanf("%d",&b);
printf("Enter third number:");
scanf("%d",&c);
ptr1=&a;
ptr2=&b;
ptr3=&c;
if(a>b&&a>c)
printf("%d is the largest number",*ptr1);
else if(b>a&&b>c)
printf("%d is the largest number",*ptr2);
else
printf("%d is the largest number",*ptr3);
return 0;
}
Input/Output
WACP to implement call by value and call by
reference.
Call By Value
Source Code:
#include <stdio.h>
int sum(int);
int main() {
int n;
printf("Enter the value: ");
scanf("%d", &n);
n = sum(n);
printf("The sum is %d\n", n);
return 0;
}
int sum(int x) {
return x + 10;
}
Input/Output
Call By Reference
Source Code:
#include<stdio.h>
void sum(int *);
int main()
{
int n;
printf("Enter the value:");
scanf("%d",&n);
sum(&n);
printf("The sum is %d",n);
return 0;
}
void sum(int *x)
{
*x=*x+10;
}
Input/Output
Conclusion:
From the above practical I came to know how to
display largest number among the three different
number and implement call by value and call by
reference using pointer.
MILESTONE INTERNATIONAL SECONDARY SCHOOL
SUBJECT: CS (4282)
Lab 7
Function And Control Structure
(JavaScript)
Submitted to:
Submitted by:
Name : Samadhi Raj Bajracharya
Registration No : 813250040111
Kapil Sharma
(Computer Instructor)
For the partial fulfillment of the requirement for Grade 12 Computer Science
course design by NEB.
Balkumari, Lalitpur
2024/2025 AD
JavaScript (JS) Overview
Source Code:
function sum() {
let a = prompt("Enter First Number?");
let b = prompt("Enter second number");
let sum = parseInt(a) + parseInt(b);
document.write("The sum is " + " " + sum);
}
sum();
Input/Output
Write a Javascript program to check whether
the number entered by the user is odd or
even.
Source Code:
function oddeven() {
let a = prompt("Enter any Number?");
if (a % 2 == 0) alert(a + " is even number");
else alert(a + " is odd number");
}
oddeven();
Input/Output
Write a Javascript program to calculate the
factorial of a given number using function.
Source Code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-
scale=1" />
<title>Fatorial</title>
</head>
<body>
<script type="text/javascript">
function factorial() {
let n = prompt("Enter any number:");
let i,
fact = 1;
if (n <= 1) alert("The factorial of " + n + " is 1");
else
for (i = 1; i <= n; i++) {
fact = fact * i;
}
alert("The factorial of " + n + " is " + fact);
}
factorial();
</script>
</body>
</html>
Input/Output
Write a Javascript program to display the
largest number among the 10 different
number.
Source Code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-
scale=1" />
<title></title>
</head>
<body>
<script type="text/javascript">
let i, large;
let array = [];
for (i = 0; i < 10; i++) {
array[i] = parseInt(prompt("Enter number: " + (i + 1)));
}
alert(array + " ");
large = array[0];
for (i = 1; i < 10; i++) {
if (large < array[i]) {
large = array[i];
}
}
alert(large + " is the largest number");
</script>
</body>
</html>
Input/Output
Write a Javascript program to design
Calculator.
.<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-
scale=1" />
<title>Calculator</title>
</head>
<body>
<script src="Artihematic.js"></script>
Result<br />
<input type="text" id="result" /><br />
<input type="submit" value="Add" onclick="sum();" />
<input type="submit" value="Subtract" onclick="subtract();" />
<input type="submit" value="Multiply" onclick="multiply();" />
<input type="submit" value="Divide" onclick="divide();" />
</body>
</html>
Source Code JS:
function sum() {
let a = document.getElementById("first").value;
let b = document.getElementById("second").value;
let add = parseInt(a) + parseInt(b);
document.getElementById("result").value = add;
}
function multiply() {
let a = document.getElementById("first").value;
let b = document.getElementById("second").value;
let multiply = parseInt(a) * parseInt(b);
document.getElementById("result").value = multiply;
}
function divide() {
let a = document.getElementById("first").value;
let b = document.getElementById("second").value;
let divide = parseInt(a) / parseInt(b);
document.getElementById("result").value = divide;
}
function subtract() {
let a = document.getElementById("first").value;
let b = document.getElementById("second").value;
let subtract = parseInt(a) - parseInt(b);
document.getElementById("result").value = subtract;
}
Input/Output
Conclusion:
SUBJECT: CS (4282)
Lab 8
Control Structure And Database Connectivity
(PHP)
Submitted to:
Submitted by:
Name : Samadhi Raj Bajracharya
Registration No : 813250040111
Kapil Sharma
(Computer Instructor)
For the partial fulfillment of the requirement for Grade 12 Computer Science
course design by NEB.
Balkumari, Lalitpur
2024/2025 AD
PHP (Hypertext Preprocessor) Overview
Source Code:
<?php
$a=(int)readline('Enter First Number');
$b=(int)readline('Enter Second Number');
$sum=$a+$b;
echo"The sum is ".$sum;
?>
Input/Output
Write a PHP to display 1 to 10 using for
loop, while loop and do while loop.
Source Code:
<?php
for ($i = 0; $i <= 10; $i++) {
echo $i . "<br>"; // Output the number, then a line break
}
?>
Input/Output
Source Code:
<?php
$i = 1;
while ($i <= 10)
{
echo $i . "<br>";
$i=$i + 1;// Output the number, then a line break
}
?>
Input/Output
Source Code:
<?php
$i = 1;
do
{
echo $i . "<br>";
$i=$i + 1;// Output the number, then a line break
}
while($i <= 10)
?>
Input/Output
Write a PHP to display the largest number
among ten different number.
Source Code:
<?php
$a = (int) readline('Enter first number: ');
$b = (int) readline('Enter second number: ');
$c = (int) readline('Enter third number: ');
Input/Output
WAP to connect database using PHP.
Source Code:
<?php
$host = "localhost";
$user = "root";
$password = "";
$dbname = "student";
$conn = mysqli_connect($host, $user, $password,$dbname) or die();
?>
MILESTONE INTERNATIONAL SECONDARY SCHOOL
SUBJECT: CS (4282)
Lab 9
PowerPoint Presentation
(MS - PowerPoint)
Submitted to:
Submitted by:
Name : Samadhi Raj Bajracharya
Registration No : 813250040111
Kapil Sharma
(Computer Instructor)
For the partial fulfillment of the requirement for Grade 12 Computer Science
course design by NEB.
Balkumari, Lalitpur
2024/2025 AD
MILESTONE INTERNATIONAL SECONDARY SCHOOL
SUBJECT: CS (4282)
PowerPoint Presentation On
“Networking And Communication”
Submitted
In
Soft Copy
Submitted to:
Submitted by:
Name : Samadhi Raj Bajracharya
Registration No : 813250040111
Kapil Sharma
(Computer Instructor)
For the partial fulfillment of the requirement for Grade 12 Computer Science
course design by NEB.
Balkumari, Lalitpur
2024/2025 AD
Microsoft PowerPoint Overview