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
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.
hello sir jii kaisee hoo sab kuch thik?
ReplyDelete