0% found this document useful (0 votes)
1 views9 pages

PHP Linux Lab Previous

The document outlines the software lab examination for IV semester BCA/B.Sc CA students conducted in December 2021, detailing various programming tasks and questions. Each question is assigned specific marks, with tasks involving shell programming, PHP coding, and HTML form design. The examination covers topics such as string manipulation, database operations, Linux commands, and web application development.

Uploaded by

carloesport007
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)
1 views9 pages

PHP Linux Lab Previous

The document outlines the software lab examination for IV semester BCA/B.Sc CA students conducted in December 2021, detailing various programming tasks and questions. Each question is assigned specific marks, with tasks involving shell programming, PHP coding, and HTML form design. The examination covers topics such as string manipulation, database operations, Linux commands, and web application development.

Uploaded by

carloesport007
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/ 9

Software lab examination IV sem BCA/B.

Sc CA (TM) December 2021

Question1--- 25 marks, Question2 ---35 marks

Qpcode : D2-S2-Q1

1. Write a shell program to check whether two strings are equal or not, length is zero or not
and concatenate the two strings.
2. Create a table login (userid, password, role, visit_count) and insert five records, role must
be admin or user and visit_count is zero for all users to start with. Write a PHP code to
login with valid userid and password and update the visit count field in each visit by one.

Software lab examination IV sem BCA/B.Sc CA (TM) December 2021

Question1--- 25 marks, Question2 ---35 marks

Qpcode : D2-S2-Q2

1. Write a menu driven shell program to copy, edit, rename and delete a file.
2. Create an application form using html which contains Name, Address, Dob, Gender,
Mobile No, Blood Group. Write a PHP code to save the data only if the applicant is greater
than eighteen years old.
Software lab examination IV sem BCA/B.Sc CA (TM) December 2021

Question1--- 25 marks, Question2 ---35 marks

Qpcode : D2-S2-Q3

1. Write a Shell program to get two file names from the user and check whether they are same
or not. If both the files are same delete the second one.
2. Design an HTML page to accept six marks and write PHP code to find the average

Software lab examination IV sem BCA/B.Sc CA (TM) December 2021

Question1--- 25 marks, Question2 ---35 marks

Qpcode : D2-S2-Q4

1. Write a shell script to get two strings from the user and check whether the two strings are
equal or not, length is 0 or not and then concatenate the two strings.
2. Create tables book (bookid, title, author) and issue (issue_date, bookid, student_name).
Insert ten rows to book table and write a PHP code to issue the books
Software lab examination IV sem BCA/B.Sc CA (TM) December 2021

Question1--- 25 marks, Question2 ---35 marks

Qpcode : D2-S2-Q5

1. Illustrate the working of Linux commands to


(a) Display current working directory
(b) List all running processes
(c) Display current shell
(d) Change directory to a subdirectory of current working directory
(e) Display all files in your directory with “.c” extension.
(f) Display primary and secondary prompt
(g) Display information related to terminal

2. Create a table employee (empno, name, mobile, email) and insert ten records. Design a
PHP page for searching with name.
Software lab examination IV sem BCA/B.Sc CA (TM) December 2021

Question1--- 25 marks, Question2 ---35 marks

Qpcode : D2-S1-Q1

1. Perform the following actions using vi Editor


a. Open vi editor and type 8 line of text
b. Copy and paste first three lines
c. Delete a line from cursor position and also 5 lines from the beginning
d. Delete a word from cursor position
e. Search for a specific word and delete it
f. Save file with file name and exit
g. Open the file make changes and quit without saving

2. Create two tables teacher (tid, name, department, designation, dob, mobno) and subject(sid,
tid, subject). Insert five records in each table. Design php pages for searching teacher’s
data and display subject details of that teacher using tid.

Software lab examination IV sem BCA/B.Sc CA (TM) December 2021

Question1--- 25 marks, Question2 ---35 marks

Qpcode : D2-S1-Q2

1. Write menu driven shell program to display today’s date, current user and current working
directory.
2. Create a table employee (empno, name, mobile, email) and insert five records. Design a
php page for updating details of employee.
Software lab examination IV sem BCA/B.Sc CA (TM) December 2021

Question1--- 25 marks, Question2 ---35 marks

Qpcode : D2-S1-Q3

1. Illustrate the working of basic Linux commands to


a. Check the present working directory
b. Display current path settings
c. Include current working directory in path settings
d. List the contents of a directory using wild cards *, ?
e. To create and delete multiple sub directories
f. Create a directory hierarchy “bca/exam/internal”
g. Change primary prompt to current date

2. Create a table book (bookid, title, author, price, publisher and number_of_pages) and insert
five records. Design a php page for list all distinct titles and when clicking on the title, it
should show a second page giving book details.

Software lab examination IV sem BCA/B.Sc CA (TM) December 2021

Question1--- 25 marks, Question2 ---35 marks

Qpcode : D2-S1-Q4

1. Write a shell script to check whether a file is existing or not. If the file exists then check
whether it is ordinary File, directory file, readable, writable, executable or not

2. Design a web page for applying a vehicle loan with fields Application number, Name,
Address, Mobile number, Loan duration and Loan amount. Write a php code to save the
application to a database.
Software lab examination IV sem BCA/B.Sc CA (TM) December 2021

Question1--- 25 marks, Question2 ---35 marks

Qpcode : D2-S1-Q5

1. Write a shell script to get three file names and a directory name as command line argument
and create the three files and the directory in in the current working directory. Display
appropriate message if command line arguments are less than four.

2. Design a webpage for getting Name, Mobile Number, Email and Password of a person.
Write a PHP program to validate the following
a. Mobile Number must be a positive integer and its length is 10
b. Email validation
c. Password contains special characters and numbers
Software lab examination IV sem BCA/B.Sc CA (TM) December 2021

Question1--- 25 marks, Question2 ---35 marks

Qpcode : D1-S2-Q1

1. Using vi Editor, Perform the following tasks


a. Create a file, write your name and address save and exit
b. Open the same file
c. Copy first line and paste at the end of the file
d. Delete a given word in the file
e. Delete two lines
f. Delete word from the current cursor position
g. Exit without saving the changes

2. Create a Student table (Adm.No, Name, Dob, Gender,EmailId, MobNumber) and insert
five records. Write php code to search students using Adm No.

Software lab examination IV sem BCA/B.Sc CA (TM) December 2021

Question1--- 25 marks, Question2 ---35 marks

Qpcode : D1-S2-Q2

1. Use Linux commands to


(a) Display current working directory
(b) Change directory to the parent directory
(c) Change directory to a subdirectory of current working directory
(d) Display all files in your directory with “.c” extension.
(e) Create a file “student.txt” and store name of five students
(f) Add two more names to “student.txt”
(g) Give write permission to others for “student.txt”

2. Develop a php application for recording employee’s details (EmpNo, Name, Dob,
Address, Mob number). Add five meaningful records
Software lab examination IV sem BCA/B.Sc CA (TM) December 2021

Question1--- 25 marks, Question2 ---35 marks

Qpcode : D1-S2-Q3

1. Use Linux commands :


a. Create file “student” in your current working directory
b. Rename the file as “names.txt”
c. Create a folder “bca”
d. Copy names.txt as names.dat in “bca” and Delete the file names.txt.
e. Display contents of directory “bca” with various options without moving to “bca”
subdirectory
f. Move to the directory “bca”
g. Create another file and give read, write and execute permission for user and only
execute permission for group and other.

2. Design a php page for getting marks of six subjects for a student and create a well
formatted marksheet.

Software lab examination IV sem BCA/B.Sc CA (TM) December 2021

Question1--- 25 marks, Question2 ---35 marks

Qpcode : D1-S2-Q4

1. Write shell program to perform menu driven program to check for


A) file existence, B) file readable or not C) file writeable or not.

2. Design a webpage for getting Regno, Name, Address, Age and Password. Write a php
program to validate the following
a. Age between 18 and 40
b. Length of password > 8 and it contains special characters and numbers
Software lab examination IV sem BCA/B.Sc CA (TM) December 2021

Question1--- 25 marks, Question2 ---35 marks

Qpcode : D1-S2-Q5

1. Write a shell script to set all permission to user and execute permission only to group and
others for all files in the current directory
2. Write php code getting marks of six subjects (out of 100 marks) of a student and display
the grade
Less than 40 % Failed
<50% Grade D
<60% Grade C
<70% Grade B
<80% Grade B+
<90% Grade A
Above 90% Grade A+

You might also like