Thursday, December 29, 2022

SOLVED PABSON SEE PRE-QUALIFYING EXAM-2079 Subject: Opt. II Computer

 SOLVED PABSON

SEE PRE-QUALIFYING EXAM-2079

Subject: Opt. II Computer

 

Full Marks: 50

 

Candidates are required to write their answers according to the Time: 1:30 Hrs. instructions given.

 

Group 'A'

 

1. Answer the following questions in one sentence.                                   [6x1=6]

 

 

a) Write two examples of bounded media.

Ans: Any two examples of bounded media are Twisted Pair Cable and Fiber Optic Cable

 

b) Write two methods for hardware security.

Ans: Any two methods for hardware security are Insurance and Regular maintenance of computer hardware.

 

c) What is M-Commerce?

Ans: The online transactions through the wireless handheld devices such as mobile phone, laptop, palmtop, tablet, or any other personal digital assistant is called M-Commerce.

 

d) List two examples of DBMS.

Ans: Any two examples of DBMS are MS-Access and Oracle.

 

e) What is modular programming in Q-Basic programming?

Ans: Modular programming is a technique that divides a program into many small, manageable, logical and functional modules or blocks.

 

f) What is C language?

Ans: C language is a structured programming language that divides program into many functions.

 

2. Write the technical term for the following statements. [2x1=2]

 

a) The fake attempt to obtain sensitive information such as username, password by disguising oneself as a trustworthy entity. Phishing 

 

b) The technology to encode file or message. Encryption

 

3. Write the Full Forms of the following:                           [2x1=2]

 

 

a) URL - Uniform Resource Locator

 

b) ADSL - Asymmetric Digital Subscriber Line

 

 

 

Group 'B' [9x2=18]

4. Answer the following questions:

 

a) "Computer network reduces the operation cost". Justify the statement.

Computer Network reduces expenses of an office because computer on a network share different hardware devices like printers, scanners, hard disk etc. And sharing those hardware devices will reduces the expense of an office. For example if there are twenty computers in an office, now for printing the data there is no need to buy twenty printers individually rather than simple network the computer and connect the printer on the network which helps in sharing of the one printer among twenty computers which reduces the cost of buying nineteen printers individually.

 

b) What is computer security? Write two measures to protect it.

The security given to the computer for the protection of hardware, software and data from being lost or damaged due to accidental or intentional harm is known as computer security.

Any two measures to protect it are Insurance and Password.

 

c) What is e-governance? Write any two advantages of e- governance,

The use of ICT and its application by the government for the provision of information and public services to the people is called e-governance.

Any two advantages of e-governance are :

a)     Speed - Electronic technologies make communication better, and faster. It will take very less time for any policy, or scheme to reach to the people.

b)     Transparency - The use of e-governance helps make all functions of the business transparent.  All the information of each and every policy will be directly available to the citizens.

 

d) What is E-commerce? Write any two advantages of it.

Ecommerce refers to the buying and selling of goods or services using the internet.

Any two advantages of it are:

a)     It makes buying/selling possible 24/7.

b)     It makes buying selling procedure faster, as well as easy to find products.

 

e). How does IOT help in our daily life? Explain.

With the use of IOT, accessing information is easy; we can control a device that is miles apart in real time. Communication between the connected devices becomes more transparent and easier.

There are smartwatches and many other wearables that monitor our health conditions on a real-time basis. So if some medical urgency is needed such devices can initiate the necessary actions like alerting the family members, calling an ambulance, etc.

f) List any four data types of MS-Access. Also mention its function.

Any four data types of MS-Access are:
i) Text -
It is used for storing text or combination of text and numbers. It can store up to 255 characters.
ii) Date/Time – Stores date and time
iii) Memo - It is used for storing lengthy text and numbers. It can store up to 65,535 characters.
iv) AutoNumber - Unique value generated by Access for each new record.

 

 

g) Define field and record in database.

Record is a collection of multiple related fields in a row which gives complete information about a person or thing. E.g.: Ram Chabahil 4468790

A column in a table is called field, and it contains a specific piece of information within a record. E.g.: Name, Address, Telephone

 

 

h) What is primary key? Write its importance.

A key that uniquely identifies each record in a database is primary key.

Its importance are:

To reduce and control duplication of record in a table.
iTo set the relationship between tables.

 

i) What is query in MS-Access? List different types of query in MS-Access.

Query is an object of Ms-Access which extracts and arranges information from a table in a manner that is specified.

The different types of query are:
i) Select query
ii) Action query
In action query, we have update query, append query, delete query and make-table query.

 

 

5. Write the output of the given program showing the dry table.                       [2]

 

 

DECLARE SUB series()

CLS

CALL series

END

 

SUB series()

A=11111

C=5

WHILE C>=1

PRINT A;

A=A\10

C=C-1

WEND

END SUB

 

 

 

Dry Run

Variable

Variable

Condition Check

Output

A

C

C>=1

 

11111

5

5>=1 Yes

11111  1111  111    11  1

1111

4

4>=1 Yes

 

111

3

3>=1 Yes

 

11

2

2>=1 Yes

 

1

1

1>=1 Yes

 

0

0

0>=1 No

Loop Exits

 

 

Output

11111  1111  111    11  1

 

6. Debug the following program.

 

REM to store name, address in the file "store.dat"

CLS

OPEN "store.dat" FOR INPUT AS #1

DO

INPUT "Enter name"; name$

INPUT "Enter address"; address

WRITE name$, address$

INPUT "do you want to continue"; ans$

LOOP WHILE UCASE$(ans$)="Y"

CLOSE #2

END

 

Debugged program.

 

REM to store name, address in the file "store.dat"

CLS

OPEN "store.dat" FOR OUTPUT AS #1

DO

INPUT "Enter name"; name$

INPUT "Enter address"; address$

WRITE #1, name$, address$

INPUT "do you want to continue"; ans$

LOOP WHILE UCASE$(ans$)="Y"

CLOSE #1

END

 

 

 

7. Read the following program and answer the given questions: [2]

 

DECLARE SUB string(x$)

CLS

X$=“COMPUTER"

CALL string(X$)

END

 

SUB string(x$)

 L=LEN(X$)

FOR A = L to 1 step -2

PRINT MID$(x$.A,1);

NEXT A

END SUB

 

Questions:

 

a) What is the value of L in the above program?

Ans: The value of L in the above program is 8.

 

b) List the numeric and string variable in the above program.

Ans: Numeric variable = L, A

String Variable = X$,

 

Group C

 

 

8. Convert the following as indicated. [4x1=4]

 

i) (CAB)16 into binary

 

 

ii) (767)8 into decimal

i) (1110111)2 + (1011)2-(11)2

 

 iv) (10111101)2 ÷(101)

 

9. Answer the following questions: [4x2=8]

 

a) Write a program to calculate total surface area of a cylinder using function procedure and volume using sub procedure. [Hint: Total surface area-2 pr(h+r), Volume=pr2h]   [4]

 

DECLARE FUNCTION AREA(R, H)

DECLARE SUB VOL(R,H)

Cls

INPUT "Enter radius"; R

INPUT "Enter height"; H

PRINT AREA(R, H)

Call VOL(R, H)

END

 

FUNCTION AREA (R, H)

    AREA = 2 * 3.14 * R * (R + H)

END FUNCTION

 

SUB VOL (R, H)

    V = 3.14 * R ^ 2 * H

    PRINT "Volume of cylinder"; V

END SUB

 

b) A sequential data file "employee.dat" contains name, address, age and salary of employees. WAP to display all the information whose address is 'Kathmandu' and salary is greater than 50000.                        [4]

 

 

OPEN "employee.dat" FOR INPUT As #1

CLS

WHILE NOT EOF(1)

    INPUT #1, N$, A$, AG, S

    If UCASE$(A$) = "KATHMANDU" AND S > 50000 THEN

        PRINT N$, A$, AG, S

    END IF

WEND

CLOSE #1

END

 

 

10. Write a program in C programming to find the reverse of an input number. [4]

 

#include <stdio.h>

int main()

{

  int n, s = 0, r;

  printf("Enter any number: ");

  scanf("%d", &n);

  while (n != 0)

{

    r = n % 10;

    s = s * 10 + r;

    n /= 10;

  }

  printf("Reversed number = %d", s);

  return 0;

}

 

 

OR

 

 

Write a C program to input three different numbers and check whether the input number is positive, negative or zero. [4]

 

#include <stdio.h>

 

int main()

{

    int n;

        printf("Enter any number: ");

    scanf("%d", &n);

        if(n > 0)

        printf("Number is POSITIVE");

    else if(n < 0)

        printf("Number is NEGATIVE");

    else

        printf("Number is ZERO");

    return 0;

}

 

 

 

Saturday, October 1, 2022

C Programming Questions Collection - SEE Computer Science 2079

 1.      Write a program in C language to ask length, breadth and height and display volume of box.

2.      Write a program in c language to calculate simple interest.

3.      Write a program in C language that asks a number and check whether it is odd or even.

4.      Write a C program that asks a number and check whether it is negative, positive or zero. [SEE 2078], [MODEL SET 2]

5.      Write a program in C language to input a number then check whether the number is fully divisible by 5 or not.

6.      Write a program in C language to input a number then check whether the number is divisible by 5 and 7 or not. [SEDIPS 2078]

7.      Write a program C language that asks any two numbers and displays the greatest among them.

8.      Write a program in C language to display the series with their sum.1, 2, 3, 4 upto 10th terms.

9.      Write a program in C language to display first 10 odd numbers. [SEE 2078]

10.   Write a C program to find the sum of first 10 natural numbers.

11.   Write a program in C language to display the series 2, 4, 6, 8 up to 10th terms.

12.   Write a program in C language to display the series 1, 1, 2, 3, 5, 8 upto 10th terms.

13.   Write a program in C language to print series1, 8, 27, 64………..up to 10th terms.

14.   Write a program in C language to display the below series: 5, 10, 15, 20, ….50.

15.   Write a program in C language to display the series with their sum; 100, 95, 90, 85…..upto 10th term. [SEDIPS 2078]

16.   Write a program to print the numbers from 1 to 100 using while loop in C language.

17.   Write a program in C language to generate the series using SUB …… END SUB : -10, -18, -6, -4, ………. Up to 20th term.

 

We will not punish mistakes and errors. Mistakes are how we learn.

 

 

QBasic File Handling Programming Questions Collection 2079 - SEE Computer Science 2079

 1.      Write a program to create a sequential data file “salary.dat” to store programmer’s name, salary and post according to the need of the user. [SEE 2078]

2.      Write a program in QBASIC to create a file "EMP.DAT" and store employees Name, Address, Salary and Telephone number on the basis of user choice.

3.      Create a sequential data file “std.dat” to store name and marks obtained in English, Math and Science subjects for a few students. [SEE MODEL 2065]

4.      Write a program to store records regarding the information of Book Number, Book’s name and Writer’s name in a sequential data file called “Library.dat”. [SLC 2065 R]

5.      Write a program to create a sequential  data file “Employee.dat” to store employees’ name, address, age and gender.

6.      Write a program to create a data file “teldir.dat” to store name, address and telephone number of employees according to the need of the user. [SLC 2069 R]

7.      Create a data file to store the records of few employees having Name, Address, Post, Gender and Salary fields. [SEE 2073]

8.      Write a program to store Roll no., Name, Class and Address of any five students.

9.      Write a program to create a sequential data file "salary.data" to store programmer's Name, salary and post according to the need of the user. [SEE 2075 S2]

10.   Students Name, Class, Section and Address are stored in a data file called “STUDENT.dat”. Write a program to print all the records of students.

11.   A sequential data file called “MARKS.DAT” contains roll no., name, English, nepali and maths fields. Write a program to display all the contents of data file.

12.   A sequential data file “Staff.dat” contains the name, address, post and salary of the employees. Write a program to read and display all the records stored in the above file. [SLC 2069 S]

13.   A sequential data file called “Marks.dat” contains name, english, nepali, maths and science fields. Write a program to display all the contents of that data file.

14.   A sequential data file “Record.dat” has records with field name, addres, age and salary. Write a program to display only those records whose age is greater than 26. A sequential data file called “Marks.dat” contains NAME, AGE, CITY AND TELEPHONE fields. Write a program to display all the contents of the data file.

15.   A sequential data file called “Record.dat” has stored data under the field heading Roll No., Name, Gender, English, Nepali, Maths and Computer. Write a program to display all the information of those students whose marks in English is more than 40. 

16.   A sequential data file “emp.dat” contains employee’s name, address, gender and salary. WAP to display all the information of employees whose salary is more than Rs. 20,000 [NPABSON PRE BOARD 2078]

17.   A sequential data file called “Record.txt” has stored data under the field heading Roll No., Name, Gender, English, Nepali, Maths and Computer. Write a program to display all the information of those students whose gender is “F” and obtained marks in computer is more than 90. [MODEL SET 1]

18.   Write a program to update the rate by increasing 10% from a sequential data file "Data.dat" that store item name, rate and quantity. [PABSON PRE BOARD 2078 - 2]

19.   A data file “LIB.TXT” consists of Book’s name, Author’s name and price of books. Write a program to count and display the total number of records present in the file.

20.   A sequential data file “EMP.DAT” contains name, post and salary fields of information about employees. Write a program to display all information of employees along with tax amount also.(Tax is 15% of salary)

21.   A sequential data file called “student.dat” contains some records under the fields Name, English, Nepali and computer. Write a program to add some more records in the same sequential data file. [SLC 2068 R]

22.   Write a program to view those records from “Employee.dat” sequential data file having employee’s name, department, appointment data and salary whose salary is more than Rs 5000. [SLC 2068 S]

23.   A data file “Salary.dat” contains the information of employee regarding their name, post and salary/ Write a program to display all the information of employee whose salary is greater than 15000 and less than 40000. [SLC 2071 R]

24.   A sequential data file called “Marks.dat” has stored data under the field heading Roll No, Name, English, Nepali and maths. Write a program to display all the information of those students whose marks in Nepali is more than 50. [SLC 2071 S]

25.   A data file "STAFF. dat" has stored records of few employees with EmPID, First name, Lastname, post and salary. Write a program to display all the records of the employees whose salary is more than  40,000.

26.   A Sequential data file called "SEE.DAT" has stored data under the field heading Symbol No., Name, English, Nepali, Maths and Computer. Write a program to display all the information of those students whose marks in Computer is more than 80.

27.   A sequential data file “person.txt” contains information such as name, address and DOB of 20 people. Write a program to display only those records whose age is below 18 and address is Lalitpur.

28.   A data file “Staff.dat” has stored records of few employees with EmpID, name, address, post and salary. Write a program to display all the records of the employee whose address is Butwal and salary is more than 40,000.

29.   Write a program to update the rate by increasing 10% from a sequential data file “data.dat” that storte item name, rate and quantity.

30.   A sequential data file “Employee.rec” consists of numerous records of employees of a company on the following fields: employee’s name, post, salary and status (i.e. permanent or temporary). Write a program to read records of the “Employee.rec” file and display the records of permanent employees whose post is manager.

31.   Write a program to open a sequential data file “STAFF.DAT” which will display students’ name, roll no., gender, class and section of class of ten students on the screen.

32.   A sequential data file “employee.rec” contains employee no, employee name, employee address, designation, salary and Date of join. WAP to count and display those records of employees whose DOJ (Date Of Join) is on January 1st.

33.   Write a program that asks student’s name and marks in English, Math and Computer and stores into “pass.dat” only those records that are passed in all the subjects. The user will be asked whether to input another record or not.

QBASIC Modular Programming Questions Collections 2079 - SEE Computer Science 2079

 MODULAR PROGRAMMING

1.      Write a program in QBASIC that asks length, breadth of a room and calculate its area and perimeter. Create a user defined function to calculate area and sub program to calculate perimeter.

[Hint: [Area=LxB], [p=2(L+B]]

2.      Write a program in QBASIC that will asks the user to input length, breadth and height of a room then use SUB procedure calculate its volume and FUNCTION procedure to calculate its area of four walls.

3.      Write a program to calculate Area of circle using Function procedure and use SUB procedure to calculate its circumference in Q-Basic.[Hint: [A=πr2], [C=2πr]

4.      Write a program in QBASIC that ask the radius of circle. Write a program to calculate the area and circumference of a circle. Create a user defined function first (r) to calculate area and sub procedure second (r) to calculate circumference of a circle.

5.      Write a program in QBASIC that asks length, breadth and height of room and calculate its area and volume. Create a user defined function to calculate area and sub-program to calculate volume. Hint: [A=L×B], [V=L×B×H] [MODEL SET 1]

6.      Write a program in QBASIC that will asks the user to input length, breadth and height. Create a user defined function to calculate surface area of four walls and write sub program to calculate surface area of box. [Hint: surface area of for walls=2H(L+B), surface area of box=lh+bh+lb

7.      Write a program in QBASIC that allows user to enter radius of a circle. Create a user define function to find the area of circle and sub procedure to find volume of a cylinder. Hint: [A= r2        v= πr2h]

8.      Write a program to define a function procedure to display area of sphere and sub procedure to display volume of sphere where user has to input the required data in the main module. [Hint: Area of sphere: 4*PI*R^2, Volume- V = 4/3 * π * r³ 

9.      Write a program in QBASIC that asks two numbers to find square of two numbers using SUB procedure and average of two numbers using FUNCTION procedure.

10.   Write a program in QBASIC that allows the user to input length, breadth and height and then calculate the area of 4 walls. Hint: [A = 2H(L+B)] [MODEL SET 2]

11.   Write a program to calculate the area of four walls using SUB…END SUB.

12.   Write a program in QBASIC to find the total surface area of a box using FUNCTION…END FUNCTION.

13.   Write a program to calculate and print the simple interest using FUNCTION procedure

14.   Write a program using FUNCTION…END FUNCTION to get temperature in celsius from the user and then print the temperature in fahrenheit. [SLC 2070 R]

15.   Write a program using FUNCTION…END FUNCTION, to find the area of triangle.

16.   Write a program in Q-Basic to find the perimeter of rectangle using Sub…END SUB procedure.

17.   Write a program using FUNCTION…END FUNCTION to find the average of any two numbers given by the user. [SLC 2066 S]

18.   Using FUNCTION…END FUNCTION Write a program to calculate the average of three numbers.

19.   Write a program to calculate the volume of a cylinder using FUNCTION….END FUNCTION

20.   Using FUNCTION….END FUNCTION, Write a program to calculate distance travelled by a body. [SLC 2065R]

21.   Write a program using SUB…END SUB to get radius of circle and then print its area.

22.   Write a program using FUNCTION module to calculate and print the volume of a box. [SLC 2066 R]

23.   Write a program using SUB…END SUB to get radius of a circle and then print its circumference. [SLC 2067 S]

24.   Using user defined function, write a program to input monthly income in parameter then computer annual tax to be paid. The tax rate is 15% if annual income is above Rs. 200000, otherwise tax rate is 1%.

25.   Write a program in QBASIC to ask a number and display sum of digits by using FUNCTION..END FUNCTION.

26.   Write a program in Q-Basic to find the largest among three number using FUNCTION procedure.

27.   Write a program that asks any three numbers and displays the difference between the greatest and the smallest value among the 3 supplied numbers using FUNCTION procedure.

28.   Write a program to ask a number and display odd or even using FUNCTION procedure.

29.   Write a program to test whether the given number is positive or negative using SUB…..END SUB. [SEE MODEL 2065 ],

30.   Using SUB…END SUB Write a program to test whether the given number is completely divisible by 13 or not. [SLC 2067 R]

31.   Write a program to input three different numbers in the main module and then find the greatest number using SUB procedure.

32.   Write a program to input a year and display whether that year is a leap year or not. [divisible by 4 but not 100] using sub procedure.[Y MOD 4 = 0 AND Y MOD 100 <> 0 OR Y MOD 400 = 0]

33.   Write a sub program to find whether the given number is perfect square number or not.

34.   Using SUB…END SUB Write a program to print the following series 9,7,5,…1.

35.   Write a program using SUB…END SUB to print the series 1,1,2,3,5,8… upto ten terms.

36.   Write a program to print natural numbers from 1 to 5 using SUB…END SUB.

37.   Write a program using SUB…END SUB to print the first ten odd numbers.

38.   Write a program to print the sum of digits of a given number using SUB procedure.

39.   Write a program to generate the series using SUB …… END SUB : -10, -18, -6, -4, ………. Up to 20th term.

40.   Write a program using a SUB procedure module to print the multiplication table of any input number up to tenth termsWrite a program that asks any number and calculates its factors using a SUB procedure

41.   Write a program using FUNCTION…END FUNCTION, to get a word from the user and the print the word in reverse order.

42.   Write a program using SUB…END SUB to get a word from the user and then print it in reversed order. [SLC 2070 R], [SEE 2072]

43.   Write a program to declare SUB procedure to print only the vowels from a given word.

44.   Write a program to count the total number of vowels using FUNCTION…END FUNCTION. [SEE 2073]

45.   Write a program using FUNCTION…END FUNCTION to input a string and count the total number of consonants. [SLC 2071 R]

46.   WAP using FUNCTION procedure named extract (“Education”) to extract all the characters from the given string excluding the first and last characters only. The output of the given program is ducatio.

(Your program should not contain any if condition and looping statement.)

47.   Display the pattern using SUB procedure: (You can’t feed input as neither abcde nor in any cases given alphabets)

a

BB

ccc

DDDD

eeeee

48.   Write a program using FUNCTION... END FUNCTION to count the number of words in a sentence. [SEE 2074]