Wednesday, 8 July 2026

Introduction to Computing (Question Paper)



Department of Computer Science & Engineering, University of Kalyani

CBCS-Part-I 2nd Semester Examination, 2025

Subject: Introduction to Computing

Paper: MCS-GEC-201                  

Full marks = 40                         Time: 2 Hours


The figures in the right-hand margin indicate marks.

Candidates are required to give their answers in their own words as far as possible.

The notations follow their standard meanings.

Answer question number one and any three from rest.




1.     Answer any five questions:                                         (2 x 5 = 10)


    (i)      What do you mean by I-P-O cycle?

    (ii)     Realize the AND Gate by using universal gate.

    (iii)    What is the use of sizeof() operator?

    (iv)    What do you mean by Non-positional Number System’and ‘Positinal Number
System’?

    (v)     What do you mean by ‘Modulo Division’?

    (vi)    Write down the different types of modern computers based on shapes, sizes and capabilities. 
Also, classify modern computers based on working principle.

    (vii)    What do you mean by ‘scanf()’ and ‘printf()’ function in C-Programming?

    (viii)     What do you mean by ‘BASE’ for a given number system? Propose a number system having 
BASE’ as (N+1).



2.     (a)     Solve the following. 

                (i)      (9A8C)16 = ( ? )8

                (ii)     (1010111101.1010111101)2 = ( ? )16

                (iii)    (29.25)10 = ( ? )2 
                
                (iv)    (10101)2 + (11101)2 = ( ? )2

                (v)     The ASCII stands for ______


    (b)     What is the common disadvantage of the sign magnitude and 1’s complement representation of 
signed numbers? Express (-36)10 as a 16 bit 2’s complement representation of a signed number.   

                                                                                                                     (5+(2+3))



3.     (a)     What do you mean by flowchart? Discuss the symbols used in drawing a flowchart.

        (b)     Draw a flowchart to find the roots of a quadratic equation ax2 + bx + c = 0 for real value of 
‘x’ and a ≠ 0.

        (c)     Draw a flowchart to check whether the given integer is odd or even.  

                                                                                                             ((1+2)+4+3)



4.     (a)     What do you mean by C-Tokens? Write down the difference between keywords and 
identifiers.

        (b)     Find the value of ‘y’ in the following expression:

                    (98) 10 + (y) 2 = (AB) 16 + (20) 8 .

        (c)     Write a C-Program to convert the number of days into years, months and days.

                                                                                                                        (4+2+4)



5.     (a)     Write a C-program to find the ‘x’ to the power ‘y’ (xy) by using pow() function.

        (b)     Write a C-program for finding the largest from three positive integers a, b and c.

        (c)     Write a C-program to print the multiplication table from 1 x 1 to M x N.

                                                                                                                           (2+4+4)



6.     Short notes:                                                                     (2 x 5)

Answer any two of the following:

    a)     Catalan Numbers.

    b)     Amicable Numbers.

    c)     Anagram String.

    d)     Magic Square Puzzle.







Introduction to Mathematical Keywords

Pythagorean Triplet


Pythagorean Triplet:- A Pythagorean triplet is a set of three positive integers (a, b, c) that perfectly satisfy the Pythagorean theorem: a2 + b2 = c2    


->    The Pythagorean theorem (after Pythagoras, around 582–481 BC) states that: If a and b are the lengths of the legs of a right triangle and c is the length of the hypotenuse, then the sum of the areas of the squares on the two legs equals the area of the square on the hypotenuse.


a2    ->    Area of the square with side length a,    
b2    ->    Area of the square with side length b, and    
c2    ->    Area of the square with side length c.


a
and
b
are the
lengths of the two legs of a right triangle and
c
is the length of the hypotenuse

->    The triangles formed by these Pythagorean triplets are shown below.


eg.-    (a, b, c) = (3, 4, 5)


3 2 + 42 = 52






  • Some sets of Pythagorean triplets are shown below.





  • How to Find Pythagorean Triplets: Different Methods:-


  • The Scaling Method:-  A fundamental Pythagorean triplet can be used to generate infinitely many new Pythagorean triplets by multiplying each of its three numbers by the same positive integer.

->    Let X be any positive integer. Then another Pythagorean triplet can be obtained by multiplying each element of the original triplet by X, as shown below.

eg.-   

  • Base: (3, 4, 5)
  • Multiply by 2: (6, 8, 10)
  • Multiply by 3: (9, 12, 15)

  • i.e.
                (X*a)2 + (X*b)2 = (X*c)2.   

    The set (X*a, X*b, X*c)  that satisfies the Pythagorean theorem.


    • Finding Pythagorean Triplets Using the General Formula (Given One Number):-
    If one number of the triplet is known (let's call it
    m
    ), the remaining two numbers can be found using the following method.

    If the given number is Even:

    Let the even number be m    first number of a triplet ) .
    ->    Divide the number by 2 to get m/2 .
    ->    The second number is m2 - 1 .
    ->    The third number is m2 + 1 .
    Example:     For the number 16,    m/2 = 8. The other two numbers are 82 - 1 = 63 and 82 + 1 = 65. The triplet is (16, 63, 65) .

    If the given number is Odd:
    Let the odd number be m    first number of a triplet ) .
    ->    The second number is (m2 - 1)/2 .
    ->    The third number is (m2 + 1)/2 .
    Example:    For the number 3m = 3 . The other two numbers are (32 - 1)/2 = 4 and (32 + 1)/2 = 5. The triplet is (3, 4, 5) .

    • Using Euclid's Formula (Generating new triples):-
    To generate a new primitive Pythagorean triplet, select two positive integers m and n, where m > n > 0, and they are not both odd.
    Then,    
    • a = m- n2
    • b = 2mn
    • c = m2 + n2
    Example:     If you choose m = 3 and n = 2 :
    Then,     a = 9 - 4 = 5 ;     b = 2*3*2 = 12     and
    c = 9 + 4 = 13
    The triplet is (5, 12, 13).




    Computer Organization & Architecture (COA) – Full Course

    Computer :- A computer is characterized by the Input–Process–Output (IPO) cycle, in which it accepts input, processes the data, and produces...