Monday, March 8, 2021

QBASIC Programming Questions Collections 2077 / 78 - SEE Computer Science

 QBASIC Programming Questions Collections 2077 / 78 - SEE Computer Science

SET 1

1.     Using FUNCTION…END FUNTION, write a program to calculate the average of three numbers [SLC 2067] [SLC 2070 S]

2.     Write a program using SUB…..END SUB to find the sum, difference, product and average of any two numbers given by the user.

3.     Write a program in QBASIC to find square  and cube of a given number using FUNCTION…..END FUNCTION.

4.     Write a program in QBASIC to find cube root of a given number using FUNCTION…..END FUNCTION.

5.     Write a program in QBASIC to find square root of a given number using SUB…..END SUB.

 

SET 2

1.     Write a program using SUB……END SUB to find the area and perimeter of rectangle. [A=L*B] [P=2(L+B)]

2.     Write a program using FUNCTION……END FUNCTION to find the area and perimeter of square. [A=L2] [P=4L]

3.     Write a program in QBASIC to find the area of four wall of a room using both function and sub procedure. [SLC 2064] [SLC 2068] [SLC 2073]

4.     Write a program using FUNCTION…END FUNCTION to find area of the triangle. [SLC 2072] [Hints: Area=] or Area = ½*b*h (sub Procedure)

5.     Write a program using SUB….END SUB to get radius of circle and then print its circumference. [C=2PR]  [SLC 2067 S]

6.     Write a program using SUB….END SUB to get radius of the circle and display the area. [SLC 2065 S] [SLC 2071] [SLC 2074]

7.     Write a program using Function Module to calculate and print the volume of a box. [ V=L*B*H] [SLC 2066]

8.     Write a program in QBASIC  to find the total surface area of a box using  FUNCTION….END FUNCTION. [SLC 2068 S] [TSA = 2(LB+LH+BH)

9.     Write a function procedure to read the side of a cube. Calculate its volume and surface area. (Hint: vol=side3 and sa=6 side2]

10.  Write a program to calculate and print the simple interest using FUNCTION……END FUNCTION.

[SLC 2069 S]

11.  Using FUNCTION……END FUNCTION, write a program to calculate distance travelled by a body. (Hint: s=ut+ (1/2) at2)  [SLC 2065]

12.  Using Function…… End Function, write a program to calculate volume and total surface area of hemisphere. [ volume = 2/3 πR3] [TSA=3πR2]

13.  Write a function procedure to calculate volume and area of sphere.[A=4πR2, V = (4 / 3) * 3.14 * R ^ 3]

14.  Write a program to declare user defined function using FUNCTION……END FUNCTION to calculate volume of cylinder. [Hint: vol= Pr2h]

15.  Write a sub program cost(l,b,h,c) to find the cost of painting the four walls of a room.

16.  WAP to input cost price and selling price and calculate profit using sub procedure. [P= SP-CP]

17.  WAP to input cost price and selling price and calculate loss using function procedure. [L= CP-SP]

18.  WAP to calculate loss percentage using sub procedure.

19.  WAP to calculate profit percentage using function procedure.

20.  Solve a quadratic equation ax2+bx+c=0 on the basis of the coefficient values a, b, and c using sub procedure. []

 

 

 

 

 

SET 3

1.     Write a program using Function…..End Function to get temperature in Celsius from the user and then print the temperature in Fahrenheit.(hint: F=9C/5+32) [SLC 2070]

2.     Write a program to input Fahrenheit and convert it into Celsius using SUB - END SUB.  Hint: C = (5/9)×(F-32)

3.     Write a program to convert USD(dollar) into NC (NEPALI currency) using DECLARE FUNCTION.

4.     Write a program to convert NC (NEPALI currency) into IC (Indian Currency) using DECLARE SUB.

5.     WRITE A PROGRAM to ask a number as paisa and convert them into corresponding rupees only solve it using SUB Procedure.

6.     Write a program to input distance in kilometre and convert into meter using function procedure.

7.     Write a program to input days and convert into years, months and days using sub procedure.

8.      Write a program to input seconds and convert into hours minutes and seconds using sub procedure.

9.      Write a program to input hours and convert into seconds using function procedure.

10.  Write a function convert(N) to read a number in inches and convert it into feet and inches. [1 foot = 12 inches]

 

SET 4

1.     Write a program to input any number and check whether the given no. Is divisible by 3 and 7 or not using function procedure.

2.     Using SUB…END SUB, write a program to test whether the given number is completely divisible by 3 or not. [SLC 2067]

3.     Write a program to declare a sub procedure module to decide whether an input no is multiple of  5 or not.

4.     Write a sub program to enter any 15 numbers and display only those numbers which are divisible by 5.

5.     Write a function program to find whether the given number is perfect number or not.

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

7.     Write a program to display only perfect square numbers between 1 to 100 using SUB-END SUB.

8.     Write a program to define a function procedure which returns whether a input number is positive, negative or zero.

9.     Write a program to input any number and check whether the given no. Is positive or negative using sub procedure. [SLC 2066 S]

10.  Write a program to input a year and display whether that year is a leap year or not. [divisible by 4 but not 100 or divisible by 400] using sub procedure.

11.  Write a program to input any number and display whether it is odd or even using function procedure.

12.  Input the age of a person and find out whether the person is eligible to drive or not using sub procedure. [age >=16]

13.  Write a program to input the age of the voters and check whether they can cast the vote or not. Using SUB…………END SUB.

14.  Write a program to input the percentage of the student and check whether the student is pass or fail. Using SUB…………END SUB.

15.  WAP to input marks in 3 subject and calculate total and percentage. And display pass or fail.

 

SET 5

1.     Write a program to enter any two numbers and display the smaller one using function procedure.

2.     Write a program to input three different numbers in the main module then find the greatest number using SUB….END SUB. [SLC 2068 S]

3.     Write a program to enter any three numbers and display the greatest, smallest and the middle number using sub procedure.

4.     Write a program to print the greatest numbers among the ten different numbers input by the user using a function procedure

5.     Write a program to enter any 25 numbers and display the greatest and smallest one using array using function procedure

 

SET 6

1.     Write a sub program to input three sides of a triangle and determine whether a triangle can be formed or not.

2.     Write a function  program to input three sides of a triangle and determine whether a triangle is right angled triangle or not.

3.     Write a sub program to input three angles of a triangle and determine whether a triangle is right angled triangle or not.

4.     Write a sub program to input three sides of a triangle and determine whether a triangle is equilateral, isosceles or scalene triangle or not.

5.     Read perpendicular and base of a right angled triangle to find hypoteneous by using FUNCTION – END FUNCTION.

 

SET 7

1.     WAP to print the sum of the digits of a given numbers using SUB Procedure. [SLC 2070 S]

2.     Write a function program to input number and find sum of odd digits.

3.     Write a sub program to input number and find sum of even digits.

4.     Write a function sub program to input number and find sum square of digits.

5.     Write a function program to input number and find sum of square of odd digits.

6.     Write a sub program to input number and find sum of square of even digits.

7.     Write a function program to input number and find sum of cube of digits.

8.     Write a sub program to input number and find sum of cube of odd digits.

9.     Write a function program to input number and find sum of cube of even digits.

10.  Write a sub program to enter any 10 numbers and find the sum of numbers.

11.  Write a function program to enter any 10 numbers and find the sum of odd numbers.

12.  Write a sub program to enter any 10 numbers and find the sum of even numbers.

13.  Write a sub program to input number and count total no. of digits.

14.  Write a function program to input number and count total no. of odd digits.

15.  Write a sub program to input number and count total no. of even digits.

16.  Write a sub program to enter any digit and display even digits

17.  Write a sub program to enter any digit and display odd digits

18.  Write a program to enter a number and find the product of its digits using FUNCTION procedure.

19.  Write a function program to input number and find product of odd digits.

20.  Write a sub program to input number and find product of even digits.

21.  Write a sub program to enter any 5 numbers and display its product.

22.  Write a program using FUNCTION procedure to reverse and display the integer number having more than one digit passed as arguments from the main module. [Hint: 123 is reversed as 321].

23.  Write a function program to input any number and check whether the given no. is palindrome or not.

24.  Write a sub program to display first 20 palindrome numbers.

25.  Write a sub program to display all palindrome numbers from 1 to 200.

26.  Write a function program to input any number and check whether the given no. is armstrong or not.

27.  Write a sub program to display first 5 armstrong numbers.

28.  Write a sub program to display all armstrong numbers from 1 to 500.

29.  Write a function program to enter any 10 numbers and sort in ascending order.

30.  Write a sub program to enter any 10 numbers and sort in descending order.

 

 

 

 

 

 

 

SET 8

1.     Write a function program to input number and check whether the given no. is prime or composite.

2.     Write a sub program to display all prime numbers from 1 to 100.

3.     Write a sub program to display first 15 prime numbers

4.     Write a sub program to input number and check whether the given no. composite or not.

5.     Write a program using SUB procedure to display the sum of all the prime number from first 50 natural number using sub procedure, where the number is passed as parameter

6.     Write a sub program to input any number and display the factors.

7.     Write a sub program to input any number and display the prime factors.

8.     Write a function program to input any number and find sum of factors.

9.     Write a program source code using SUB.....END SUB to calculate the factorial of an input number.

10.  Write a sub program to input any number and display the prime factorial of a given number.

11.  Write a program to print 1st 20 composite numbers that lays in between 1 to 100      using SUB..... END SUB.

12.  Write a sub program to display multiplication table of a given number.

13.  Write a program in QBASIC to input any two different number and print HCF using SUB………END SUB

14.  Write a function program to display l.c.m of a given any two numbers.

15.  WAP to display HCF and LCM of any two given numbers using function procedure.

 

SET 9

1.     Write a program to print the natural numbers from 1 to 5 using SUB...........END SUB. [SLC 2069 S]

2.     Write a subprogram to display all odd numbers from 1 to 100.

3.     Write a sub program to display all even numbers from 2 to 100.

4.     Write a sub program to display all natural numbers from 1 to 100 in descending order.

5.     Write a sub program to display all odd numbers from 1 to 100 in descending order.

6.     Write a sub program to display all even numbers from 2 to 100 in descending order.

7.     Write a QBASIC program to find the sum of square of first 10 integers using SUB…..END SUB statement

8.     Write a sub program to find the sum of all odd numbers from 1 to 100.

9.     Write a function program to find the sum of all even numbers from 2 to 100.

10.  Write a program to display all natural numbers from 1 to 100 also display its sum using function procedure.

11.  Write a program to display all odd numbers from 1 to 100 also display its sum using function procedure.

12.  Write a sub program to display cube of all numbers from 1 to 50.

13.  Write a sub program to display square of all numbers from 1 to 50.

14.  Write a function program to print the sum of the numbers between 2 to 50.

15.  Write a function program to print the sum of square of odd numbers up to 100.

16.  Write a sub program to print the sum of even numbers between 2 to 50.

17.  Write a function program using to print the sum of first ten positive integers.

18.  Write a sub program to print first ten multiples of input number.

19.  Write a sub program using  to display first 13 odd numbers.

20.  Write a sub program using to display first 19 even numbers.

 

 

 

 

 

 

 

 

 

SET 10

1.     Using SUB……….END sub, write a program to print the following serial  9, 7, 5,……1 [SLC 2065]

2.     Write a sub program using  to display product of all numbers from 4 to 8.

3.     Write a sub procedure to display 1, 11, 111, 1111, 11111

4.     Write a program in QBASIC to display the following series using SUB…. END SUB or FUNCTION….END

FUNCTION. 5, 55, 555 ….. up to 6th terms [SLC 2064]

5.     Write a program to display 55555, 5555, 555, 55, 5 by using SUB........END SUB.

6.     Write a sub procedure to display 1, 12, 123, 1234, 12345

7.     Write a sub procedure to display 1, 22, 333, 4444, 55555

8.     Write a sub procedure to display 1, 33, 555, 7777, 99999

9.     Write a sub procedure to display 12345, 1234, 123, 12, 1

10.  Write a sub procedure to display 55555, 4444, 333, 22, 1

11.  Write a sub procedure to display 54321, 5432, 543, 54, 5

12.  Write a sub procedure to display 5, 54, 543, 5432, 54321

13.  Write a sub procedure to display 5, 56, 567, 5678, 56789

14.  Write a sub procedure to display 1, 10, 101, 1010, 10101

15.  Write a sub procedure to display 13579, 1357, 135, 13, 1

16.  Write a sub procedure to display 1, 23, 456, 78910

17.  Write a sub procedure to display 123456789, 1234567, 12345, 123, 1

18.  Write a sub procedure to display 0.2, 0.02, 0.002, 0.0002, 0.00002, 0.000002

19.  Write a sub procedure to display .1, .11, .111, .1111, .11111

20.  Write a sub procedure to display 0.00005, 0.0005, 0.005, 0.05, 0.5

21.  Write a sub procedure to display .1, .01, .001, .0001, .00001

22.  Write a Qbasic Program to generate 0.1, 0.22, 0.333, 0.4444, 0.55555

23.  Write a Qbasic Program to generate 1800, 1600, 1400, ……..10th term.

24.  Write a sub procedure to display

40

38  40

36  38  40

34  26  38  40

32  34  36  38  40

25.  Write a sub procedure to display

70  65  60  55  50

70  65  60  55

70  65  60

70  65

70

26.  Write a sub procedure to display

1          2          3          4          5

      2          4          6          8          10

3             6          9          12        15

      4          8          12        16        20

      5          10        15        20        25       

27.  Write a sub procedure to display 1/2, 2/3, 3/4,......15th term.

28.  Write a sub procedure to generate the following series: 1, 121, 12321, 1234321, 123454321

29.  Write a sub procedure to display 123454321, 1234321, 12321, 121, 1

30.  Write a program to display the following series by using SUB….END SUB: 3, 3, 6, 9, 15, 24, 39, 63,

102, 165

31.  Write a sub program to generate the following series 9,28,14,7,22,11…………..10th term

32.  Write a sub procedure to generate  7,22,11,34……………19th terms.

33.  Write a program to print the following series by using SUB ……END SUB: 1, 4, 9, 16.....upto 10th term.

34.  Write a program to print the following series by using SUB ……END SUB: 1, 8, 27, 64.....upto 10th term.

35.  Write a sub procedure to display the following series: 999, 728, 511.........upto 10th term.

36.  Write a QBASIC Program to generate the series: 315, 270, 215, 150 ........ upto 10th term.

37.  Write a sub procedure to display the following series: 5, 10, 20, 35, 55.........upto 10th term.

38.  Write a program using sub procedure to display following series.

2,         6,         12,       20,       30 ………………………..up to 10th term

39.  Write a sub – procedure to print the following series 2 , 4,  8, 14, 22 …upto 10th terms

40.  Write a program to print the following series 2, 8, 18, 32, 10th terms using SUB ……………. END SUB

41.  Write a program using sub procedure module to print the series 1,1,2,3,5,8.. up to ten terms. [SLC 2069]

42.  Write a program to display the following series using SUB…….END SUB: 1,2,4,7,11 upto 10th term

43.  Write a program to display the following series using SUB..END SUB: 0, 1, 3, 6, 10, 15, upto 10th term.

44.  WAP to display 3, 4, 6, 10…….up to 10th terms using SUB procedure

45.  Write a program to display 2, 4, 8, 16,...........12th term using sub procedure.

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

47.  Write a program using SUB....END SUB to generate the series: 1, 8, 18, 32..........upto 10 terms.

48.  Write a sub program to display numbers 2, 4, 6, ............20.

49.  Write a sub program to display numbers 100, 90, 80, .................10

50.  Write a sub program to display numbers -10, -5, 0, 5, 10.............upto 12th terms.

 

SET 11

1.     Write a program using FUNCTION….END FUNCTION to get a word from the user and print the word in the reverse order. [SLC 2065 S] [SLC 2067 S] [SLC 2068] [SLC 2070] [SLC 2072] (use sub procedure also)

2.     Write a program to test whether the input word is palindrome word or not using FUNCTION…………END FUNCTION and SUB Procedure.

3.     Write a sub to input two different strings and find the longest string.

4.     Write a program to print the shortest word among the three different word input by the user using FUNCTION…….END FUNCTION.

5.     Write a sub program to enter any ten strings and display the longest strings.

6.     Write a function program to enter any ten strings and display the shortest string.

7.     Write a sub program to enter any ten strings and sort in ascending order.

8.     Write a function program to enter any ten strings and sort in descending order.

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

10.  Write a program to find the numbers of vowels in an input string using ‘FUNCITON…..END FUNCTION’.

[SLC 2069]

11.  Write a program using FUNCTION... END FUNCTION to count the number of words in a sentence.

[SLC 2074]

12.  Write a program to count the total no. Of vowels, consonants and words of the entered sentence using SUB.......END SUB.

13.  Write a program to declare SUB procedure to print only the vowels from a given word. [SLC 2066]

14.  Write a function program to input any string and display only consonants.

15.  Write a program to input a string then print vowel characters in upper case and consonant characters in lower case using function – end function. (Suppose input string is NEPAL then output should be nEpAl)

16.  Write a program to enter any word and print alternate case of each character using DECLARE SUB eg. Nepal to NePaL.

17.  Write a sub Program that accept the full name of the person and display the initial character of the first name and middle name with full family name.(eg.Meg Bahadur Thapa as M.B.Thapa)

18.   Write a program to enter a long string and display only initial character of each word Using function procedure. Jagat Mandir School = J.M.S

19.  Write a sub program to input any string and display only consonant by removing vowels.

20.  Write a function program to input any string and display only vowels by removing consonants

21.  Write a sub program  to input any string and check whether the first character of a input string is alphabet, number or symbol.

22.  Write a function program to check whether the supplied character is alphabet or not.

23.  Write a to remove the spaces from the string I am a proud of being Nepali using FUNCTION Procedure

24.  Write a program to ask to enter a string then find out the sum of even ASSCII value of each characters by using FUNCTION .....END FUNCTION.

25.  Write a function program to count the frequency of characters r or s present in the supplied string.

 

SET 12

1.     Write a program using SUB……….END SUB to display: N, NE, NEP, NEPA, NEPAL

2.     Write a program using SUB……….END SUB to display: L, AL, PAL, EPAL, NEPAL

3.     Write a program using SUB……….END SUB to display: NEPAL, NEPA, NEP, NE, N

4.     Write a program using SUB……….END SUB to display: NEPAL, EPAL, PAL, AL, L

5.     Write a program using SUB……….END SUB to display: NEPAL, EPA, P

6.     Write a program using SUB……….END SUB to display: P, EPA, NEPAL

7.     Write a program using SUB……….END SUB to display *nepal* *nepa* *nep* *ne* *n*

8.     Write a program using SUB……….END SUB to display:

*

**

***

****

*****

9.     Write a program using SUB……….END SUB to display:

*

***

*****

*******

*********

10.  Write a program using SUB……….END SUB to display:

*****

****

***

**

*

11.  Write a program using SUB……….END SUB to display:

                     *NEPAL*

                   **NEPAL**

                ***NEPAL***

  ****NEPAL****

*****NEPAL*****

12.  Write a program using SUB……….END SUB to display:

N

E

P

A

L

13.  Write a program using SUB……….END SUB to display:

L

A

P

E

N

14.  Write a program using SUB……….END SUB to display:

N

    E

       P

          A

               L

 

15.  Write a program using SUB……….END SUB to display:

L

   A

       P

         E

            N

16.  Write a program using SUB……….END SUB to display:

NEPAL

   EPAL

     PAL

       AL

           L

17.  Write a program using SUB……….END SUB to display:

NEPAL

   EPA

      P

18.  Write a program using SUB……….END SUB to display:

      P

    EPA

 NEPAL

19.  Write a program using SUB……….END SUB to display:

a

BB

ccc

DDDD

eeeee

20.  Write a program using SUB……….END SUB to display:

*

**

***

****

*

**

***

****

*

*

*

*

 

SET 13

1.     Write a sub program  to convert decimal number to binary number.

2.     Write a sub program  to convert decimal number to octal number.

3.     Write a sub program  to convert decimal number to hexa decimal number.

4.     Write a function program  to convert binary number to decimal number.

5.     Write a function  program  to convert hexa decimal number to decimal number.

6.     Write a function  program  to convert octal number to decimal number.

 

SET 14

1.     Write a sub program to input number of passengers and their destination. The program should calculate the total bus fare and the discount amount according to the following conditions.

Rates for the different destinations:

Destinations                            rate

Pokhara                                   450 per person

Butwal                                    500 per person

Chitwan                                  300 per person

Discount rate

If the number of passenger is 5 or above then discount=5% in the total amount.

2.     Write a sub program to input total number of words and compute telegram charges which are as follows:

For the first 20 words :           rs 15

For the next 20 words :          rs 10

Above that for each word:      re 1

 

3.     In order to discourage heavy consumption of electricity, the electricity board charges the following rates:

First 80 units: rs 4 per unit

Next 60 units:             rs 6 per unit

Above that :    rs 7 per unit

Every user has to pay a minimum charge of rs. 100 irrespective of the total amount of electricity consumed. In case total consumption is more than 300 units an additional charge of 10% is added. Write a sub program to read consumer’s name, units consumed and print out total amount to pay along with name of consumer.

4.     WAP to supply percentage from the keyboard and print the grade using sub – program. Use the following conditions:

Percentage                                                Grade

Per>=90 and P<=100              A+

Per>=80 and P<90                  A

Per>=70 and P<80                  B+

Per>=60 and P<70                  B

Per>=50 and P<60                  C+

Per>=40 and P<50                  C

Per>=30 and P<40                  D+

Per>=20 and P<30                  D

Per<20                                    E

 

5.     WAP to enter marks of 8 subjects and display GPA and Grade.

 

 

 

 

 

SET 15

1.     Write a program to store Roll no., Name, Class and Address of any five students. [SLC 2074]

2.     Write a program in QBASIC to open a sequential data file “EMP.DAT”, which contains employees records: Name, address and phone number and display all the records as well as total number of records stored in the file. [SLC 2064]

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

4.     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]

5.     Write a program to create a sequential data file “employee.dat” to store employees’ name, address, age, gender and salary. [SLC 2066]

6.     A sequential data file “emp.dat” contains name, post and salary fields of information about employees. Write a program to display all the information of employees along with tax amount (also tax is 15% of salary). [SLC 2067]

7.     A sequential data file called “student.dat” contains same records under the field’s name, english, nepali and computer. Write a program to add some more records in the same sequential data file. [SLC 2068]

8.     A sequential data file called “Marks.dat” contains roll number, name, English, Nepali, and Maths field.Write a program to display all the content of the data file. [SLC 2065 S] [SLC 2067 S] [SLC 2070]

9.     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. [SLC 2066 S]

10.  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]

11.  A sequential data file called 'Marks.dat' contains NAME, AGE, CITY, and TELEPHONE fields. Write a program to display all the contents of that data file. [SLC 2072]

12.  Create a datafile to store the records of few employees having Name,Address, Post, Gender and Salary fields. [SLC 2073]

13.  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 data file. [SLC 2069 S]

14.  A sequential data file "RECORD.DAT" has records with field name, address, age and salary. WAP to display only those records whose age is greater than 26. [SLC 2070 S]

15.  A sequential data file named “record.dat” contains first name, last name and age. Write a program to display all the records whose age is more than 60.

16.  WAP to open a data file “record.dat” that contains name, address, date of birth, email and telephone number of some employees. Now display all those records whose date of birth is in current month.

17.  Wap to delete some records from “neps.dat” file where computer ask user to enter the record, which is to be deleted. (fields are name, address, and telephone number).

18.  Write a program to open a data file “student.dat” that contains name, address, telephone number and parent’s name of some students. Now display all those records whose address is “lalitpur”.

19.  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]

20.  A sequential data file “salary.dat” contains the information, employee-code, employee-name, post, and basic-salary. Write a program to display those records whose basic-salary is between 10000 to 15000 and post is ‘officer’.

21.   A sequential data file named “nabil.txt” contains record of clients of a bank including depositor’s name, deposited amount, time and rate of interest. Wap to display detail of all depositors including simple interest.

22.  WAP to search and display only those record whose percentage is more than 60% from the data “result.dat” which contain student’s symbol number, date of birth, total marks, percentage and division.

23.  A data file name “student.dat”, contains number of records having fields name, post and salary. Write a program to count total number of “manager” in the data file. (hint: manager is a post)

24.  Create a sequential data file”price.dat” to store item name,quantity and rate also calculate total amount (total=quantity x rate).program should terminate according to the user’s choice.

25.  Create a sequential data file’post.dat’ to store name and marks of any three subjects also calculate total and percentages only for 15 students.          

26.  A sequential data file’post.dat’ has few records related to name,address,salary and dob (mm/dd/yyyy).wap to:

a.      Display all the records as well as count and display he total number of records also.

b.     Display the records whose address begins with ‘s’ or ‘d’

27.  A sequential data file named “abc.dat” has several records having fields name, roll and class. Write a program to copy all the records of class 10 into a newly created file new.dat.

28.  Write a program which reads records from the file ”result.dat” having the fields name, and marks of three different subjects and display only those records whose percentage is greater than 60 and less than 80. Also count the total number of records presenting in that data files.

29.  Wap to display all those records of student.dat having the address “birgunj” or “biratnagar”.        

30.  Write a program to display all records of “info.dat” also count and print how many persons are getting salary <=10000.

31.  A sequential data file has 100 records having field name, class and roll number. Write a program to display from 50th to 60th records.

32.  Write a program to display the first 10 records from a file named “resource.dat” having fields name, phone and email.

33.  A data file named “record.dat” contains name, age and salary for n number of persons. WAP to input a name to search data from a data file. If the data is not found, then display the message “Data not found in the list”.

34.  A sequential data file “employee.dat” contains employee no., employee name, employee address, designation, salary and date of join. Write a program to count and display those records of employees whose DOJ(Date of Join) is on January 1st .

35.  Write a program to input a data file named “marks.dat” to store name, gender, and marks in english, nepali and science. Program should terminate by user according to his/her choice. But the program should allow entering “m” of “f” for the gender.

36.  Assume that the sex-code is 1 for male and 2 for female, the educational qualification codes are 1, 2, 3 and 4 for illiterate, undergraduate, graduate and post-graduate respectively and the marital status codes are 1 and 2 for married and unmarried respectively.

37.  A sequential data file called salary.dat contains s.no, name, post and salary fields. Wap to update the salary of all the employees if post is manager and salary is more than 25000 by 15% otherwise by 10%.

38.  A sequential data file “record.dat” contains different records under fields: name rollno., name, address and percentage. Write a program to edit a record and display both edited and unedited records on the screen to compare them side by side.

39.  A sequential data file called “salary.dat” contains sn, name, salary fields. Write a program to update the salary of all employees having salary more than 10,000 by 15%.

40.  Write a program that ask your name and stores it in reverse form into a sequential data file “reverse.dat”. Make a provision so that user can input 5 records at each program execution.


5 comments:

  1. All questions haru ko solv chahiyo sir

    ReplyDelete
  2. All questions haru ko solv chahiyo sir

    ReplyDelete
    Replies
    1. All question are so good, but answer should be given belew the question.

      Delete
  3. What is this????????

    ReplyDelete