Tuesday, March 5, 2024

12 Marks Programming questions

 12 Marks Programming questions


SET 1

9 a) Write a program in QBASIC that asks radius of a circle and calculate its Total Surface Area and Volume

of sphere. Create a user - defined function to calculate volume of sphere and sub procedure to calculate Total Surface Area. [TSA=4pr2, Volume= ]                                                                           4

 

b) Write a program that prompts the user to supply Employee’s name, Salary and Gender and stores it into

FEMALE.DAT if the gender is “FEMALE”. The user can supply 10 records after each execution of this program.                                                                                                                                                4

 

10. Write a program in C language to ask a number and check whether it is a multiple of 10 or not.    4

OR

            Write a program in ‘C’ language to display the series 2, 1, 3, 4, 7, 11, 18…….up to 10th terms.

 

SET 2

9 a) Write a program in QBASIC that asks length, breadth and height and calculate its Total Surface Area and Curved Surface Area of cuboid. Create a user - defined function to calculate Total Surface Area of Cuboid and sub procedure to calculate Curved Surface Area of Cuboid. [CSA=2h(l+b), TSA=2(lb+bh+hl)] 4

b) WAP that reads the records from “MARKS.DAT” having fields name and marks in English, math and computer and display only the pass records and also count the total number of records stored in it. (Pass Mark for all the subject is 35).                                                                                                            4

10. Write a C program to input three different and find the greatest number.                                               4

OR

Write a C program to print the following series 9,7,5,…1.

SET 3

9a) 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]]                                                                                                            4

b) 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.                                                                                                                                    4

10. Write a program in C language to input a number and then check whether the number is positive, negative or zero number.                                                                                                            4

OR

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

 

SET 4

9 a) 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]                                                                                                              4

 

b) 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 “M” and obtained marks in computer is less than 35.                                        4

 

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

OR

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

 

 

 

 

SET 5

9 a) 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= pr2        v= pr2h]              4

 

b) Write a program to create a sequential data file named “Employ.Dat” to store Name, Post, Address and Salary for the number of employees. The program should terminate on user’s choice.                             4

 

10. Write a program in C language to input any two numbers and find smaller number.                                    4

OR

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

 

SET 6

9. a) Write a program in QBASIC to input length and calculate its area of square using function procedure and perimeter of square using sub procedure. [Hint: Area = L2  Perimeter = 4L]                             4

                       

b) A sequential data file called “Record.dat” has stored data under the field headings: 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 and less than 70.                                                         4

 

 

10. Write C program to find average number of any two numbers                                                   4

OR

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

 

SET 7

9 a. 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 to calculate area and sub procedure to calculate circumference of a circle.                                                                                                                  4

 

b. Write a program to update the rate by increasing 10% from a sequential data file "Data.dat" that store item name, rate and quantity.                                                                                                                4

 

10. Write a program in c language to calculate simple interest.                                                        4

OR

Write a program in C language to display first 10 odd numbers.

 

SET 8

9a) 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³                                                                                                          4

 

b) 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.      4

 

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

OR

 

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

 

 

SET 9

9a) Write a program in QBASIC that asks any three numbers and calculate its product and average. Create a user defined function to product and sub-program to calculate average.                                                           4

 

b) 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) 4

 

10. WRITE A C PROGRAM  to check greatest among 3 numbers.                   4

 

OR

 

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

 

Set 10

9a) Write a program in QBASIC that asks any number and display its square and square root. Create a user defined function to display square root and sub-program to display square of a number.                4

 

b) 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.                                                                                                                                         4

           

10. WRITE A C PROGRAM  to check whether the a person can vote or not.                                  4

OR

Write a program in C language to display first 10 odd numbers.

 

SET 11

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

b. 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.

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

OR

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

 

SET 12

  

 9 a) Write a program in QBASIC to calculate its area and perimeter. Create a user defined function to calculate area and sub program to calculate perimeter of square.

 

b) Write a program to create a sequential data file “salary.dat” to store programmer’s name, salary and post of 7 employees.

 

10.  Write a C program that asks a number and check whether it is negative or positive.

 

OR

 

Write a program in C language to display first 10 odd numbers.

 

Saturday, March 2, 2024

12 MARKS PROGRAMMING QUESTIONS FOR SEE COMPUTER SCIENCE 2080 - PREPARED BY: DEEPAK SHRSETHA

  


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.

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 to store name and mark obtained in English, Math and Science subjects for few students

4.     A sequential data file  has 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.

5.     Write a program to open data file tmp.dat which may contain name, address, phone no. and salary. The program should allow user to add few records on it.

6.     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.

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

8.     A sequential data file, "record.dat." contains several records with data items name, address, age, and phone number. Write a program to display the records of students whose age is greater than or equal to 18.

9.     A sequential data file called "Emp.dat" has stored data under the field heading name, post and salary. Write a program to display the records of those employees whose salary is more than Rs. 25000.

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

11.  Write a program to read the data from the file "empinfo.txt" and display their NAME, EMPID, POST whose POST is Clerk.

12.  A sequential data file "INFO.INF" has numerous records with name, address and telephone number in each record. Write a program to scan all the records from that file and display only the records whose address is "TANSEN".

13.  A sequential data file" records.dat" contains S.NO., Name, Address, Telephone No and Email Address. WAP to count and display those records whose email address ends in "yahoo.com" domain. Your display should be in tabular format having the fields Name, Address and Email address only.

14.  A sequential data file 'PRODUCT.DAT contains the information regarding product Id, Product name, Date of manufacturing and Price of some products. Write a program to display all the records deducting the price by 20%, where price is greater than or equal to Rs.1000.

15.  Write a program to update the rate by increasing 10% from a sequential data file "Data.dat" that store item name, rate and quantity.

16.  Write QBASIC program to delete some records from "rec.txt file where computer ask user to enter the name to be deleted. Fields are name, address and age.

17.  Write a QBASIC program that asks for Employee name and stores its reverse form into a sequential data file "Reverse Txt". Make a provision so that user can input 10 records at each program execution.

18.  Write a program to open a data file “Record.dat” which contains student’s name, class and address and print only those students’ records whose name  starts from an alphabet “A”.

 

 

 

 

 

 

 

 

 

 

1.     Write a program in C language to ask to enter two numbers and find out sum and product

2.     Write C program to find average number of any two numbers.

3.     Write a c program to accept any three numbers and display their average.

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

5.     Write a ‘C’ program that takes principle, rate and time as input and it calculate the simple interest

6.     Write a program in C-Language to find the area of four walls

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

8.     Write a C program that asks a number and check whether it is negative, positive or zero.

9.     Write a program to read a number and test whether it is positive and negative using C-programming

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

11.  Write a program in C-Language to check whether the supplied number is divisible by 7 or not

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

13.  Write a program in 'C' language to input three number and find greatest number among three numbers

14.  Write a program in C language that asks any two numbers and displays the smallest  among them.

15.  Write a program to read any three integer numbers from the keyboard and find the smallest number using C-language

16.  Write a program in C language to input length of three rods and display whether the triangle can be formed by those rods or not

17.  Write a program in C language that asks the value of 3 sides of a triangle then check whether triangle is Equilateral, Isosceles or Scalene

18.  Write a program in C-Langauge to display the series 1,2,3,4….upto 10th terms.

19.  Write a program in C language to display the series with their sum: 2, 8, 18, 32. upto 10th term

20.  Write a program in C-language to display first 10 natural numbers

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

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

23.  Write a program in C-Language to find the area of four walls

24.  Write a program in C language to display first 10 odd numbers.

25.  Write a program in C to sum of odd number from 80 to 90

26.  Write a program in C language to display the series with their sum 7, 10, 13, 16…… upto 10th term

27.  Write a C program to find sum of the numbers from 22 to 32 using FOR loop

28.  Write a program in c language to display series 1,1,2,3,5 up to 13 terms

29.  Write a program in C programming to find the reverse of an input number

30.  Write C program to input a multi-digit number and calculate the sum of its individual digits.

31.  Write a program using C language to generate the first 25 even numbers between 100 and 200.


 

1.     Write a program in QBASIC that asks two numbers to find sum of squares of two numbers using SUB....END SUB program and average of two numbers using FUNCTION...END FUNCTION.

2.     Write a program in QBASIC to find out sum of three numbers using SUB procedure and average of three numbers using FUNCTION procedure.

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

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

5.     Write a program in Q-BASIC that asks length, breadth and height of cuboid and calculate its lateral surface area and Volume. Create a Function procedure to calculate lateral surface area and sub procedure to calculate volume. [Hint:- LSA = 2h (I+b) and V=lxbxh]

6.     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

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

8.     Write a program in QBasic that ask the radius and height of a cylinder and calculate the volume and curve surface area. Create a user-defined function to calculate volume and sub-procedure to calculate curve surface area of a cylinder. [Hints: V=πr2 h, CSA=2πrh]

9.     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

10.  Write a QBASIC program that asks length, breadth, height and calculate Volume of Cuboid and Total Surface Area. Create a USER DEFINED FINCTION to calculate Volume of Cuboid and SUB-PROGRAM to calculate Total Suface of Area. [Hint: Area = 4*3.14*R^2, Volume = 4/3*3.14*R^3]

11.       Write a QBASIC program that asks radius and calculate Area of Sphere and Volume of Sphere. Create a USER DEFINED FUNCTION to calculate Volume of Sphere and SUB-PROGRAM to calculate Area of Sphere. [Hint: AOS-4pir2 and VOS-4/3pir3

12.       Write a program in QBASIC that asks for the length, breadth and height of a box. Create a user defined function to find the volume of the box and  sub procedure to find the total surface area of the box. [Hint: Vol=l x b x h ; Area=2(lb+bh+lh)

13.  Write a program in QBASIC that asks principal, time and rate of interest and calculate simple interest and amount. Create a user- defined function to calculate simple interest and sub-program to calculate amount. Hint: [SI=P*T*R/1001, (A=P+SI)

14.  Write a program in QBASIC to display greater number using function procedure and smaller number using sub procedure among three numbers. 

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