Friday, February 21, 2025

100 HUNDRED PROGRAMMING QUESTIONS COLLECTIONS [QBASIC MODULAR PROGRAMMING, QBASIC FILE HANDLING, C PROGRAMMING COLLECTIONS] – 4 + 4 + 4 = 12 MARKS

 



100 HUNDRED PROGRAMMING QUESTIONS COLLECTIONS  [QBASIC MODULAR PROGRAMMING, QBASIC FILE HANDLING, C PROGRAMMING COLLECTIONS] – 4 + 4 + 4 = 12 MARKS

 

1.     Write a program in QBASIC that asks two numbers to find remainder using SUB…END SUB program and product of two numbers using FUNCTION…END FUNCTION.

2.     Write a program in QBASIC that ask to enter any three different numbers then find out the product and average. Create a user defined function PROD() to calculate product and sub procedure AVG() to calculate average.

3.     Wise a program in QBASIC that asks any number and display its square and square root: Create a user- defined function to calculate square root and a sub program to display the square of a number.

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

5.     Write a program in Q-BASIC that asks length and 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: A=L×B, P=2(L+B)]

6.     Write a program to calculate area of rectangle using FUNCTION and area of a circle using SUB.

7.     Write a program to calculate area of a circle using SUB..... END SUB and perimeter of rectangle using FUNCTION... END FUNCTION.

8.     WAP to Find area of Four walls using FUNCTION END FUNCTION and area of rectangle using SUB END SUB

9.     Write a program in QBASIC that asks radius and height of a cylinder Create a User Defined Function to calculate total surface area and a Sub Program to calculate the volume of a cylinder.[Hint: TSA=2pr (r+h) and Volume pr2h]

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

11.  Write a program in Qbasic that ask the radius of a hemisphere and calculate its volume and total surface area. Create a user-defined function First(r) to calculate volume and sub-procedure Second(r) to calculate total surface area of a hemisphere. [Hints: TSA=3pr2, V=2/3pr3)

12.  WAP in SUB procedure to find the volume of cylinder and in function procedure to find the area of circle in Qbasic. [vol=pir2h, area=pir2]

13.  Write a program in QBASIC that asks height and radius of cylinder and calculate its volume by user define function and total surface area by sub procedure.

14.  Write a program in QBASIC that allow user to enter radius of a circle. Create a user defined FUNCTION…END FUNCTION to find volume of cylinder  and SUB…END SUB to find circumference of a circle.

15.  Write a program in QBASIC that asks radius of a circle to calculate its area and circumference. Create a user defined function to calculate area and sub program to calculate circumference.[Hint A= pr2, C= 2pr]

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

17.  WAP that asks principal, time and rate of interest and calculate simple interest using SUB..END SUB and amount using FUNCTION..END FUNCTION. [Hint : SI =P*T*R/100, Amount = P+SI].

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

 

19.  Write a program to create a sequential data file "student.dat" to store 10 students name and obtain marks in four different subjects.

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

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

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

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

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

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

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

27.  Employee's name, address, gender and salary are stored in the "EMP.DAT" sequential data file. Write a QBASIC program that displays all information about personnel whose salaries exceed 60000.

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

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

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

31.  WAP to ask student's name, class and marks secured in three subjects. Store the data in a sequential data file “result.dat” along with total marks. Make provision to ask user to enter another record.

32.  A sequential data file called “student.txt” has stored data under the field heading Name, Class, Address and Age. Write a program to display all the information of those whose class is 10 and gender is “male”.

33.  A data file "Staff.dat” has stored records of few employers with EmpID, name, address post and salary. Write a program is display all the records of the employees whose address is "Nepal" and salary is than 40.000.

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

35.  A sequential data file called "marks.dat" has stored data under the field heading student's name, eng, nep and math. Write a program to display all the record whose marks is greater than 35 in all subjects

36.  A sequential data file called ‘data.dat’ has stored data under the field heading item name, quantity and rate. Write a program to display all the records with total.

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

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

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

40.  A sequential file "detail.dat" contain Name, Age and mobile number of few persons. Write a QBASIC program to display the name of those persons who are eligible to cast the vote. [ Age must be 18 or above to cast the vote.]

41.  A sequential data file called "list.dat" has stored data under the field heading items name quantity and rate. Write a program to update all the records by increasing the rate by 10%.

42.  A sequential data file "record.dat” contains the name, address, salary of employees, and displays the record of those whose salary is more than 37000 and whose name ends with "DHA.

 

 

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

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

45.  Write a program in 'C' language to find simple interest where user need to input Principle, Rate and Time.

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

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

48.  Write a program in C language that asks for an integer value and checks whether it is divisible by 7 or not.

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

50.  Write a C program to test whether the given number is exactly divisible by 13 or not.

51.  Write a program in C language to enter a number and find out whether it is positive or negative

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

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

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

55.  WAP to read two numbers and display the smaller one using C-Program

56.  Write a progam is C language to check the students whether that are pass or fail, when the pass mark is 45

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

58.  Write a program in C language that asks the value of 3 sides of a triangle then check whether triangle is Scalene or not.

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

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

61.  Write a program in C language to display the series with their sum 1, 4, 9, 16.... up to 10th term.

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

63.  Write a C program to display the sum of first 20 even number.

64.  Write a program to print first 10 natural number using C language.

65.  Write a program in ‘C’ language to find the sum of first ten natural numbers.

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

67.  Write a program in C language to display the series with their sum 40, 41, 42, 43…….10th terms.

68.  Write a program in C language to display the odd numbers from 1000 to 500 with their sum.

 

 

 

 

EXTRA

69.  WAP in SUB procedure to find whether the input number is Armstrong or not in Q-basic.

70.  WAP in SUB procedure to enter a number and find the reverse of a number.

71.  WAP to find the sum of digits of a number using SUB….END SUB.

72.  WAP in SUB procedure to enter decimal number and find the binary number in QBASIC.

73.  WAP in Q-basic to enter a number and check whether the number is positive, negative or zero using FUNCTION procedure.

74.  Write a FUNCTION program to check whether the supplied number is divisible by 5 or not.

75.  Write a program to ask a number and check it is exactly divisible by 3 and 7 using FUNCTION..END FUNCTION.

76.  Write a program to ask a number and check it is exactly divisible by using 4 and 6 using SUB…END SUB.

77.  Write a program to accept age and citizen of a person to check whether he/she is eligible to cast vote or not using SUB…END SUB.

78.  WAP to find the greatest number out of three numbers using FUNCTION….END FUNCTION.

79.  Write a program to count the occurrence of letter ‘e’ in the supplied string using SUB…END SUB.

80.  Write a program to count the occurrence of letter ‘a’ in the supplied string using SUB…END SUB.

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

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

83.  Write a program using FUNCTION….END FUNCTION to input a string and count the total number of consonants

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

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

86.  Write a program to check whether a string is palindrome or not using SUB….END SUB.

87.  Write a program in QBASIC to display sum of first  natural numbers using FUNCTION…END FUNCTION.

88.  Using SUB……….END sub, write a program to print the following serial 9, 7, 5,……1

89.  Write a program using sub procedure module to print the series 1,1,2,3,5,8.. up to ten terms.

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

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

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

93.  Write a program using Function Module to calculate and print the volume of a box.

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

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

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

97.  WAP to print the sum of the digits of a given numbers using SUB Procedure

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

99.  Write a program using a SUB procedure module to print the multiplication table of any input number up to 10th term

100.                   Using Functions……End Functions Write a program to find odd or even

 

100 HUNDRED QUESTIONS COLLECTIONS [THEORY QUESTIONS COLLECTIONS] – 6 + 18 = 24 MARKS

 


Total 100 questions [THEORY QUESTIONS COLLECTIONS] – 6 + 18 = 24 MARKS

 

Theory questions

 

1.     What is social media? Write any two examples of data communication.

2.     What is computer network? Write any two reasons for computer network.

3.     Write any two advantage and disadvantage of computer network.

4.     What is communication channel? Write any two features of Guided media.

5.     What is unguided media? Give the name of any two unguided transmission media

6.     Differentiate between guided and unguided communication media.

7.     What is network protocol? List out any four services of internet.

8.     Give two-two difference between peer-to-peer and client/server network architecture.

9.     What is the function of file transfer protocol (FTP)?

10.  Give the importance of MODEM to the computer network.

11.  Define network topology and write any two types of topology.

12.  Write any two advantages of BUS topology.

13.  Define star topology with figure.

14.  Draw the diagram of BUS topology. Write any two advantage of star topology.

15.  What is bandwidth? Write the use/function of File Transfer Protocol.

16.  Define Bus topology? Write any two advantages of Bus topology.

17.  What is internet? Write any two advantages of Internet.

18.  What is Search Engine? Give any two examples of search engine.

19.  Define web browser with examples.

20.  What is E-mail? Give an example of valid E-mail I.D.

21.  Give two advantages of e-mail over traditional mail.

22.  Define computer ethics. Write any four commandments of computer ethics.

23.  Write any one reason why social media is popular now days.

24.  Write any two advantages and disadvantages of social media.

25.  What is computer security? Write any four possible threats to computer security.

26.  What is hardware security? Write any two protection measures of software security.

27.  What is software security? Write any two measures of hardware security.

28.  What are the computer security threats? Mention any two measures to protect from security threats.

29.  Give the importance of UPS to the computer system.

30.  Write the importance of power protection device to protect computer system

31.  What is Backup? How it helps to secure data?

32.  Write the importance of backup in data and software security.

33.  What is password? Write any two importance of password protection.

34.  What is cybercrime? Give any two examples.

35.  Define cyber law. List any two main aims of formulating cyber law in Nepal.

36.  What is anti-virus? Write down any two examples of anti-virus software.

37.  What is a computer virus? Write any two medium for transmission of computer virus.

38.  Write any four preventive measures to protect computer system from virus infection.

39.  Write any four symptoms that show, computer is infected by computer virus.

40.  What is Ecommerce? Write any two names of Nepali e-commerce sites.

41.  Write any two benefits of e-commerce.

42.  What is the business done through internet?

43.  What is the business done through the mobile?

44.  What is M-Commerce? Write any two important services.

45.  Give two differences between E-commerce and Traditional Commerce.

46.  What is IoT? Write any two importance of it.

47.  Define Artificial Intelligence with examples.

48.  Write any two uses of AI.

49.  Define virtual reality. Write any two areas where virtual reality is used.

50.  Write any two benefits of e-governance service.

51.  What is database? Name any two examples of database.

52.  What is DBMS? Write any two examples of DBMS software.

53.  Write any two advantages of computerized database.

54.  Define data type. Name any four data types that can be defined in MS-ACCESS.

55.  While designing table structure which data types are suitable to store information about teacher’s name, address, salary, and date of birth.

56.  What data types are used to store salary and date of the birth?

57.  Name any four objects of MS-Access database.

58.  Define data and information.

59.  What is primary key? Write any two importance.

60.  Write any two things to be considered after assigning primary key for a field.

61.  What is data redundancy? How can it be reduced in database?

62.  What is a form? Write any two advantages of using form.

63.  Write down any two advantages of Query. Why is reporter created?

64.  Differentiate between fields and records with an example.

65.  What are validation text and validation rule?

66.  What is data sorting? List any two advantages of using it.

67.  What type of work is done in MS-Access using form and query object.

68.  What is query? List two types of it.

69.  Which object of MS-Access is used to retrieve data from the table?

70.  Which type of query do you use to calculate the total marks of students from table in MS Access?

71.  Give the differences between the Select Query and Action Query.

72.  Define report and mention any two uses of it.

73.  Write any two elements of database. What is the default extension of MS-Access?

74.  What is the default size of text field in MS-Access?

75.  List any four features of MS-Access.

76.  Which data type is used to store alpha numeric characters or special symbols in MS-Access?

77.  Which data type is used to store date of birth in MS-Access?

78.  Which data type is suitable to store photographs of students in MS-Access?

79.  Which in the logical data type of MS-Access?

80.  Which view is used to modify a table structure in MS-Access?

81.  What is the maximum length of the field name in MS-Access?

86.  Identify a record and field name from the following table structure:

Symbol No.

Name

Marks

00100202S

Aarambha Shrestha

91

00100203T

Suhisha Rayamajhi

99

87.  Define modular programming. Write any two advantages of modular programming

88.  Write down one difference between function and sub procedure.

89.  Write any one difference between Q-Basic and C language.

90.  What is procedure? Which statement is used to call sub-procedure?

91.  What is formal parameter? What is user defined function?

92.  What is a loop? What is a variable?                                                     1

93.  Define global and local variables.

94.  Write one difference between String function and Numeric function.

95.  Define logical operators. What is meant by mode of data file?

96.  List any two data type used in C language.

97.  Write any two characteristics of C language.

98.  Write any two advantages of Structured programming.

99.  List the different types of procedures in QBasic.

100.                   Which format specifier do you use in C language for 'int' data type ?

101.                   Write down the functions of:          

RMDIR           NAME             CLOSE           MKDIR           KILL                  FILES             EOF

               SHARED      COMMON SHARED      CALL          WRITE#          OPEN              INPUT#