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.

No comments:

Post a Comment