Showing posts with label Questions- C - Programming for Problem Solving. Show all posts
Showing posts with label Questions- C - Programming for Problem Solving. Show all posts

Monday, 14 September 2026

Programming for Problem Solving for B.Tech. Pt-I (IT/EIE/ECE) 1st Semester Examination, 2025



Department of Engineering and Technological Studies, University of Kalyani

B.Tech. Pt-I (IT/EIE/ECE) 1st Semester Examination, 2025

Subject: Programming for Problem Solving

Paper: IT101

Full marks=70 Time: 3 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 five from rest.

1.     Answer any ten questions:     (2 x 10 = 20)

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

    (ii)     Write down the main components of the computer system.

    (iii)     What do you mean by infinite loops? Gives example using do-while statements.

    (iv)     What are the difference between ‘compiler’ and ‘interpreter’?

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

    (vi)     Write down the different types of modern computer based on shapes, sizes and capabilities. Also, classify the modern computer 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).

    (ix)     What is ‘getchar()’ and ‘putchar()’ function in C-Programming?

    (x)     What do you mean by ‘Recursive function’?

    (xi)     What do you mean by ‘break’ and ‘continue’ statement in C-Programming?

    (xii)     What do you mean by ‘Pointer’ variables.

    (xiii)     What are the deference between ‘string’ and ‘character’?

    (xiv)     Define the file-functions fopen(), fscanf(), fprintf().

    (xv)     What do you mean by conditional operator?

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

        (ii)     Write a C-program using integer arithmetic to convert a given number of days into years, months and days.

        (iii)     Write a C-program to find the GCD (Greatest Common Divisor) of two integer numbers.
                                                                                            (4+3+3)

3.     (i)     What do you mean by the ‘GOTO STATEMENT’ in C-Programming? What are the disadvantages?

        (ii)     What do you mean by ‘loop’ in C-Programming? Draw the flow-diagram for ‘entry- controlled loop’ and ‘exit-controlled loop’.

        (iii)     Write a C-program to print the following output using for-loops.

            * * * * *
            * * * *
            * * *
            * *
            *

                                                                        (3+4+3)

4.     (i)     What do you mean by ‘switch’ statement? Discuss different types of ‘if- statemements’.

        (ii)     Distinguish between ‘auto’, ‘register’ and ‘static’ variables.

        (iii)     Write a C-program to find the factorial of a number using recursion.

                                                                            (4+4+2)

5.     (i)     The Fibonacci numbers are defined recursively as follows:

                F1 = 1, F2 = 1, Fn = Fn-1+Fn-2, for n > 2

Write a C-function that will generate and print the first n Fibonacci numbers.

        (ii)     What is array? Discuss different data types in C-programming.

        (iii)     Write down the the different string-handling liberary functions with examples.

                                                                            (4+2+4)

6.     (i)     What do you mean by ‘structure’ and ‘union’ in C-programming? Write down the differences based on their memory need for execution.

        (ii)     Define the sizeof() operator.

        (iii)     What are the differences between ‘Arrays of Structures’ and ‘Arrays within Structures’?
                                                                            (5+2+3)

7.     (i)     Consider the following declaration:

                int x=10, y=10;

                int *p1 = &x, *p2= &y;


What is the value of each of the following expressions?

        (a)     (*p1)++             (b)     ++(*p2)

        (ii)     What do you mean by ‘call-by-reference’ and ‘call-by-value’ in a C-programming?

        (iii)     Write a C-program function using pointers to exchange the values stored in two locations in the memory.
                                                                                (2+3+5)

8.     Short notes:                                (2 x 5)

Answer any two of the following:

    (i)     ‘Hardware’ and ‘Software’ of a computer.

    (ii)     ‘Compiler’ and ‘Linker’ in C.

    (iii)     Classification of computer based on generation.

    (iv)     ‘Non-positional Number System’ vs. ‘Positional Number System’.








Programming for Problem Solving for B.Tech. Pt-I (IT/EIE/ECE) 1st Semester Examination, 2025

Department of Engineering and Technological Studies, University of Kalyani B.Tech. Pt-I (IT/EIE/ECE) 1st Semester Examination, 2025 Subject:...