Wednesday, November 5, 2025

Practice C Programs - SEE COMPUTER SCIENCE 2082

 Practice C Programs - SEE COMPUTER  SCIENCE 2082

 


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

 

Wednesday, October 1, 2025

DOWNLOAD 50 SET COMPUTER SCIENCE QUESTION N ANSWER COLLECTION 2082

 DOWNLOAD 50 SET COMPUTER SCIENCE QUESTION N ANSWER COLLECTION 2082


CLICK HERE TO DOWNLOAD

SOLVED PABSON Kathmandu – Mid Terminal Examination 2082 – COMPUTER SCIENCE – SET B

 

 

SOLVED PABSON Kathmandu – Mid Terminal Examination 2082 – COMPUTER SCIENCE – SET B

 

Attempt all questions.

 

Group ‘A'(10 Marks)

 

1. Answer the following questions in one sentence:          (6´1=6)

a)   Name any two connectors used in computer network.

BNC and RJ-45 connectors are the any two connectors used in computer network

 

b) List any two examples of power protection device.

Any two examples of power protection device are volt guard and UPS

 

c)   What is social media?

Social media is an online platform that allows people to share information, ideas, and communicate with others.

 

d) Write any two application of Artificial Intelligence.

Any two applications of Artificial Intelligence are speech recognition and self-driving cars.

 

e)   What is database?

A database is an organized collection of data that can be easily accessed, managed, and updated.

 

f)   What is actual parameter in QBASIC?

An actual parameter in QBASIC is the real value or variable passed to a subroutine or function when it is called.

       

2.   Write appropriate technical term for the following: (2´1=2)

a)   A network device that connects dissimilar networks with different protocols. Gateway

b)   A system of paying for goods and services through an electronic medium. Online payment

 

3. Write the full form of the following:                   (2´1=2)

a) Wi-Fi → Wireless Fidelity
b) G2C → Government to Citizen  

 

Group ‘B' (24 Marks)

 

4. Answer the following questions:                         (9´2=18)

a)   What is communication? List the three basic elements of any communication system.

      The process of sending and receiving data and information between two or more than two people is known as communication.

      Three basic elements are: Sender, Medium, Receiver.

 

b)   What is digital footprint?

A digital footprint is the trail of data and information left behind by an individual's online activities which includes social media posts, website visits, online purchases, and other digital engagements

 

c)   What is biometrics? What does biometrics use for user authentication?

      Biometric is a technology that uses unique physical or behavioral characteristics, such as fingerprints, facial recognition, or voice patterns, to identify and authenticate individuals.

      It uses fingerprints, face recognition, iris patterns, or voice recognition for user authentication.

 

d)   Mention any one advantage and disadvantage of e-commerce.

 

Advantage: E-commerce allows to shop 24/7 from anywhere with an internet connection.

Disadvantage: Risk of online fraud and security issues.

 

 

 

e)   What are the goals of E-Government?

      The goals of E-Government are:

v Citizens can access government services and information conveniently from anywhere. 

v Reduces paperwork and manual processes, saving time and resources. 

v Promote transparency by making government actions and decisions visible to the public. 

 

f)   What is record? Why is primary key necessary in record?

A record is a row in a table which contains information about single items in a database. Record is complete set of information.

A primary key is necessary in a database record because it reduce and control duplication of the record in a table, sets the relationship between tables and identifies each record of a table uniquely.

 

g)   Differentiate between sorting and filtering.

 

Sorting

Filtering

The process of arranging all the records in a table either ascending or descending order based on field or fields is known as sorting.

Filtering is the process of viewing required record of a table that matches the specifies criteria.

Sorting affects the entire dataset.

Filtering only affects the data that is displayed.

 

h)   What is query? Mention the different types of action query.

Query is an object of database that is used to view, retrieve, change and analyze records from a table or multiple linked tables based on specified condition.

Types of action queries:

1.     Update Query

2.     Delete Query

3.     Append Query

4.     Make-Table Query

 

 

i)      What is report? Why it is important?

Report is one of the MS-Access database objects used to present information in an effective and organized format that is ready for printing.

It is important because it summarizes information for decision-making, analysis, and sharing results.

 

5.   Write down the output of the given program. (Show with dry run in table.                               (2)

DECLARE SUB TEST(S$ )

CLS

E$ =" PABSON"

CALL TEST (E$)  

END

SUB TEST (S$)

FOR I = 1 to LEN (S$)

      IF i MOD 2 < > 0 THEN

          EE$ = EE$+LCASE$(MID$(S$,I,1))

ELSE

EE$=EE$+UCASE$(MID$(S$,I,1))

      END IF

       NEXT I

      PRINT EE$

END SUB

 

Dry Run Table

E$

S$

I = 1 to LEN (S$)

IF i MOD 2 < > 0?

Yes

EE$ = EE$+LCASE$(MID$(S$,I,1))

No

EE$=EE$+UCASE$(MID$(S$,I,1))

PRINT EE$

PABSON

PABSON

1 to 6 yes

1 mod 2<>0

1=0 Yes

p

 

 

 

 

2 to 6 yes

2 mod 2=0

0=0 no

 

A

 

 

 

3 to 6 yes

3 mod 2=0

1=0 yes

b

 

 

 

 

4 to 6 yes

4 mod 2=0

0=0 no

 

S

 

 

 

5 to 6 yes

5 mod 2=0

1=0 yes

o

 

 

 

 

6 to 6 yes

6 mod 2=0

0=0 no

 

N

 

 

 

7 to 6 no

Loop exits

 

 

 

pAbSoN

 

 

The Output of the program:

pAbSoN

 

 

 

6.  Re-write the given program after correcting the bugs: (2)

      REM To check the supplied no. is odd or even

      DECLARE FUNCTION Check$ (X)

      CLS

      ACCEPT “ANY NUMBER:”; N

      CALL Check$ (X)

      END

      SUB Check$ (N)

      Y=2

      R= Y MOD N

      IF R=0 THEN

      C$= “EVEN”

      ELSE

      C$= “ODD”

      END

      C$=Check$

      END FUNCTION

 

 Debugged Program

REM To check the supplied number is odd or even

DECLARE FUNCTION Check$ (X)

CLS

INPUT "ANY NUMBER: "; N

PRINT Check$(N)

END

 

FUNCTION Check$ (X)

  Y = 2

  R = X MOD Y

    IF R = 0 THEN

        Check$ = "EVEN"

    ELSE

        Check$ = "ODD"

    END IF

END FUNCTION

 

7. Study the following program and answer the given questions:                                   (2´1=2)

DECLARE SUB TEST (B$)

CLS

INPUT W$

CALL TEST (W$)

END

SUB TEST (B$)

            FOR I =1 To LEN (B$)

                        PRINT RIGHT$(B$), i)

            NEXT I

END SUB

      Questions:

a)   Write the name of two built in functions used in the above program.

      The name of two built in functions used in the above program are LEN( ) and RIGHT$( ).

b)   List the formal parameters of the above program.

      The formal parameters of the above program is B$.

 

Group ‘C’ (16 Marks)

 

8.   Convert / Calculate as per the instruction:      (4´1= 4)

i) (231)8 = (?)10                             ii) (1D3)16 = (?)2 

iii) (111001 - 11) + 111001          iv)(101101 ÷ 110)      

 

9. Answer the following.                                           (4´2= 8)

a)   WAP to calculate area of rectangle using SUB…. END SUB and

      area of circle using FUNCTION…. END Function. ‘

 

REM Area of Rectangle using SUB

DECLARE SUB AOR (L, B)

DECLARE FUNCTION AOC (R)

CLS

INPUT "Enter Length of Rectangle: "; L

INPUT "Enter Breadth of Rectangle: "; B

INPUT "Enter Radius of Circle: "; R

CALL AOR(L, B)

PRINT "Area of Circle = "; AOC(R)

END

 

SUB AOR (L, B)

    A = L * B

    PRINT "Area of Rectangle = "; A

END SUB

 

FUNCTION AOC (R)

    AOC = 22/7 * R ^ 2

END FUNCTION

 

 

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

 

REM Check divisibility by 4 and 6

DECLARE SUB Check (N)

CLS

INPUT "Enter any number: "; N

CALL Check(N)

END

 

SUB Check (N)

    IF N MOD 4 = 0 AND N MOD 6 = 0 THEN

        PRINT N; " is divisible by both 4 and 6"

    ELSE

        PRINT N; " is NOT divisible by both 4 and 6"

    END IF

END SUB

 

 

10.       WAP to find sum of digits of a number using SUB….END SUB.  (4)

                                                                  [Hint: 456: 4+5+6=15]

 

REM Sum of digits using SUB

DECLARE SUB Sum (N)

CLS

INPUT "Enter a number: "; N

CALL Sum(N)

END

 

SUB Sum (N)

    S = 0

    WHILE N <> 0

        R = N MOD 10

        S = S + R

        N = N \ 10

    WEND

    PRINT "Sum of digits = "; S

END SUB

 

 

.                                               or

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

 

 

REM Sum of first 10 natural numbers using FUNCTION

DECLARE FUNCTION Sum()

CLS

PRINT "Sum of first 10 natural numbers = "; Sum

END

 

FUNCTION Sum()

    S = 0

    FOR I = 1 TO 10

        S = S + I

    NEXT I

    Sum = S

END FUNCTION

 

?ÿ@