Students and Teachers Forum

DECLARE SUB Area ( l )CLSINPUT"Enter the length";lCALL Area ( l )ENDSUB Area ( l )A = l^ 2PRINT" Area of square"; AEND .....

DECLARE FUNCTION TSA ( R,H )DECLARE FUNCTION V (R,H )CLSINPUT"Enter the radius";RINPUT"Enter the height";HPRINT TSA (R,H)Print V ( R,H )ENDFUNCTION TSA ( R,H )T= 2* 22/7* R* ( R + H )TSA= TEND FUNCTIONFUNCTION V ( R,H )Vol= 22/7*R^2*HV = VolEND .....

DECLARE FUNCTION TEST$ (n) CLS Input"Enter a number"; n Result$=TEST $ (n) Print n;"is a"; result $ END FUNCTION TEST$ (n) IF n>0 THEN R$="positive" ELSEIF n<0 THEN R$="zero" END IF TEST$= R$ END FUNCTION .....

DECLARE FUNCTION AOC (R) CLS Input"Enter the radius"; R Print"The area is"; AOC (R) END FUNCTION AOC (R) CONST PI= 22/7 AOC= PI*R^2 END FUNCTION .....

DECLARE FUNCTION AREA (L, B) CLS Input"Enter the length"; L Input"Enter the breadth"; B Print"The area is"; AREA (L, B) END FUNCTION AREA (L, B) AREA= L*B END FUNCTION .....

DECLARE SUB KINS (A$) CLS A$="WELCOME" CALL KINS (A$) END SUB KINS (A$) FOR I= 1 to LEN (A$) PRINT left$ (A$, 1) NEXT I END SUB .....

DECLARE SUB KINS (A$) CLS A$="WELCOME" CALL KINS (A$) END SUB KINS (A$) FOR I= 1 to LEN (A$) PRINT Right$ (A$, 1) NEXT I END SUB .....

DECLARE SUB KINS (A$) CLS A$="KATHMANDU" CALL KINS (A$) END SUB KINS (A$) T=1 P=9 FOR I= 1 TO 5 PRINT TAB (T); MID$ (A$, T, P) T=T+1 P=P-2 NEXT I END SUB .....

DECLARE SUB KINS (A$) CLS A$="KATHMANDU" CALL KINS (A$) END SUB KINS (A$) T=9 P=1 FOR I= 5 TO 1 STEP -1 PRINT TAB (T); MID$ (A$, I, P) T= T-1 P=P+2 NEXT I END SUB .....

DECLARE FUNCTION Vowel$(A$) CLS INPUT"Enter any string";A$ PRINT Vowel(A$) END FUNCTION Vowel$(A$) FOR I = 1 to LEN(A$) B$ = U case$(MID$(A$,I,1) IF B$<>"A" AND B$ <>"E" AND B$ <> .....

DECLARE SUB Pal (A$) CLS Input"Enter any string"; A$ CALL Pal (A$) END SUB Pal (A$) For I= LEN (A$) TO 1 step-1 B$= B$+MID$ (A$, I, 1) Next I IF A$= B$ THEN Print"It is palindrome" ELSE Print"IT is not palindrome" .....

DECLARE SUB Rev(A$) CLS INPUT"Enter any string";A$ CALL Rev(A$) END SUB Rev(A$) END SUB Rev(A$) FOR I = LEN(A$) to 1 Step-1 B$=B$ + MID$(A$,I,1) NEXT I PRINT"Reverse string is";B$ END SUB .....

DECLARE FUNCTION Longest$ (name$ ()) CLS DIM name$ (3) For p= 1 to 3 Input"Enter the name"; name$ (p) Next p Print"The longest name is"; Longest$ (name$ ()) END FUNCTION Longest$ (name$ ()) Let m$= name $ (1) For p = 2 to 3 .....

DECLARE SUB GREATEST (NUM ()) CLS DIM NUM (p) Print"The greatest number is:" For p= 1 to 3 Input NUM (p) Next p Call GREATEST (NUM ()) END .....

DECLARE SUB Area (R) CLS Input"Enter the radius"; R CALL Area (R) END SUB Area (R) A= (4*3.14*R^2) Print"The area of sphere is"; A END SUB .....

DECLARE SUB Area (L, B) CLS Input"Enter the length"; L Input"Enter the breadth"; B CALL Area (L, B) END SUB Area (L, B) A = (2*(L+B)) Print"The area of rectangle is"; A END SUB .....

DECLARE SUB Interest (P, T, R) CLS Input"Enter the principle"; P Input"Enter the time"; T Input"Enter the rate"; R CALL Interest (P, T, R) END SUB Interest (P, T, R) I= (P*T*R)/100 Print"The simple interest is"; I END SUB .....

DECLARE SUB Temperature (F) CLS Input"Enter the temperature in Fahrenheit"; F CALL Temperature (F) END SUB Temperature (F) Temperature in Celsius= (5(f-32)/9) Print"The temperature in Celsius"; Temperature in Celsius END SUB .....

DECLARE SUB sum (A, B, C) CLS Input"enter the first number"; A Input"enter the second number"; B Input"enter the third number"; C CALL sum END SUB sum (A, B, C) S= A+B+C Print"The sum of three number is"; S END SUB .....

Passing argument by reference method is the default method of passing arguments to the procedure. The addresses of the variables are passed to the procedure in this method. That means parameters use the same memory addresses of the arguments. .....

The constants or variables enclosed in the parentheses of calling statement are known as arguments. The variables enclosed in the parentheses of the procedure which accept constants or variables passed to them from the calling module are .....

Hexadecimal digit is represented in 4 bits. So, a binary number is converted to its hexadecimal equivalent by grouping together successively 4 bits of the binary number starting from the least significant bit (right-most digit) and then replacing .....

Octal digit is represented in 3 bits. So, a binary number is converted to its octal equivalent by grouping their successive 3 bits of the binary number starting from the least significant bit (right-most digit) and then replacing each 3 bit group by .....

The decimal equivalent of a binary number is the sum of the digits multiplied by 2 with their corresponding weights. Solution: 8 7 6 5 4 3 2 1 0 (weight)Binary number: 1 0 1 0 1 1 1 0 1Decimal equivalent: 1×28 + 0×27 + 1×26 + .....

The sub module of a program is known as procedures. The types of procedures are as follows: SUB procedure FUNCTION procedure .....

The modular programming is a programming technique in which a program is divided into many small logical, manageable and functional parts. Any four advantages of modular programming are as follows: The debugging of the program becomes .....

The differences between PRINT# and WRITE# is as follows: PRINT # WRITE # This statement is used to display each data. This statement is used to place the data into data file. .....

The differences between APPEND mode and OUTPUT mode are as follows: APPEND Mode OUTPUT Mode It is used to add more records in the existing sequential file. It is used to create new sequential data file and write data .....

A number system that uses two different digits to represent different values is known as binary number system. The base of binary number system is 2 because it consist two digits 0 and 1. Each digit of the binary number system is called Binary Digit .....

A positive decimal integer can be converted to hexadecimal through successive division by 16 till the quotient becomes zero and sequential collection of remainder on last come first basis (i.e. bottom to top). But the remainder 10 or above is .....

A positive decimal integer can be converted to octal through successive division by 8 till the quotient becomes zero and sequential collection of remainder on last come first basis (i.e. bottom to top).Solution:Remainder8427 -3853 -586 -60Hence, .....

A positive decimal integer can be converted to binary through successive division by 2 till the quotient becomes zero and sequential collection of remainder on last come first basis (i.e. bottom to .....

A number system that uses ten different digits to represent different values is known as decimal number system. The base of decimal number system is 10 because it consist ten digits from 0 to 9. Decimal number can be expressed by using powers of .....

A number system act as the symbols used to express quantities on the basis for counting, comparing amounts, performing calculations, and representing value. The different number system use different digits or symbols to represent numbers. The number .....

Select query is a most common type of query that retrives data from one or more tables and displayed the result in a datasheet. You can also use a select query to group records and calculate sums, counts and average, minimum and maximum. An action .....

The objectives of database system are:1) To provide huge storage or space for relevant data.2) To allow easy access to the data for the user.3) To provide quick response to user request for any information or data. 4) To remove duplicate(redundant) .....

A data type is a characteristic of a field that determines the kind of data that can be stored in the field. Each field can store data relating of only a single data .....

Report is a very important object of database. It is an effective way of presenting your data in a printed format or a screen soft copy. The importance of report are as follows: You can view report on your screen before printing it. It .....

A form is a database object which is designed to enter records and edit the existing records easily. Any two uses of form are as follows: To enter data in a table or multiple linked tables. To view record at a time. .....

A query is simply a more formal way to sort and filter data stored in the database. Any four uses of queries are as follows: To analyze data of a table. To create new table with records from one or more tables. To update or delete .....

The process of viewing required data of a table that satisfy the specified criteria is known as filtering record. .....

The arrangement of records in a table either in ascending or descending order based on field is known as sorting record. .....

The list of data type are as follows: TextThe text filed data type stores text or combinations of text and numbers. MemoThe memo field data type stores lengthy text or combination of text and numbers. NumberThe number field data type stores .....

Field name is the field grid pane that specifies the name of a field within a table. The rules for naming fields are as follows: Filed name can be up to 64 characters. Filed name can have letters, spaces or punctuation marks. Filed .....

A column of a table which is used to store particular category of data is known as field and all the related field in a row that gives information about person or things is known as record. .....

A table is a primary block of a database which stores all the data in rows and columns. We need to create multiple table on MS Access because tale is a container that helps to stores multiple data in the forms of rows and columns. .....

Any four advantages of DBMS are as follows: Mass volume of data can be updated easily and efficiently. Record can be stored easily on the basis of key field. It provides the data sharing facility. It provides data security facility. .....

The differences between database and DBMS are as follows: SN Database DBMS 1 Database is a collection of interrelated data Database management system is a software which can be used to manage the data by .....

Data base management system (DBMS) is a system or mechanism that manages the database. Any four DBMS are as follows: MS Access ORACLE DBASE FOXPRO .....

The collection of data/ information related to any subject or purpose is known as database. Any four databases are as follows: The telephone directory Mark ledger Attendance register Encyclopedia .....