WBUT Previous Years Question Papers EE Basic Computation And Principles Of Computer Programming B Tech 2nd Sem 2012

WBUT Previous Years Question Papers EE

Basic Computation And Principles Of Computer Programming B Tech 2nd Sem 2012

Time Allotted : 3 Hours

Full Marks : 70

The figures in the margin indicate full marks.

Candidates are required to give their answers in their owh words

as far as practicable.

GROUP – A ( Multiple Choice Type Questions )

Choose the correct alternatives for the following:

10×1 = 10

i)                  Operating system is

a) Application software b) System software

c) Both (a) and (b)              d) None of these.

ii)                ALU is a part of

ci) memory                               m CPI /

C) output device                      d) input device,

iii)              Pointer is

a)              a variable containing the address of a variable

b)              a value

c)              a memory location

d)             none of these.


iv)          Which will be the output ? void main ()


int x = 7, y = 5; x = y++ +• x++;

y=++y + ++x; printf(“%d%d”, x, y);


a) 12 14                                 b) 12 20

c) 97                                      d) 12 19.

v)            A function may contain

a)            one return statement

b)           two return statements

c)            more than two return statements

d)           none of these.

vi)          Which one of the following is a Bitwise operator ?

a)     <                      b) >=

c) &&                       d) «.

vii)         The output of

int fact= 1;f

for (i=0;i<fact;i++);


fact=fact*i; printf(“%d”, fact);


a)                   24

c)            infinite loop

b)                   5

d)           none of these.

viii)       Which one of the following declaration is invalid ?

a)          int 2A                           b) int A2A

c)        int A2                                  d) int AA2.

ix)          Which one is the correct output ? char a[]=”computer”; printf(“%d”,strlen(a));

a) 9                                        b) 10

c) 8 d) 11.

x)            In hexadecimal system D is equivalent to the number in decimal is

a) 10                                      b) 12

c)  13                                        d) 15.

GROUP -B ( Shout Answer Type Questions )

Answer any three of the following.               3×5= 15

  1. Describe the functions of various units of a digital computer using a neat block diagram.
  2. Write a complete C program to generate Fibonacci series.
  3. a) Convert (45-5675) ihto hexadecimal.

b)           What are 2’s complement numbers ? What is signed magnitude number representation ? What is its disadvantage ?       2 + 3

  1. Write a C program to check if a string taken as input is a palindrome or not without using string related functions supported by the compiler.
  2. Write C program to print the following :


1 2

2           3 4

3           4 5 6

4           5 6 7 8

GROUP -C ( Long Answer Type Questions )

Answer any three of the following. 3 x 15 = 45

a)         Write a comparative study between for, while and do-while loop.

b)         Write a complete C program to print the following pattern for rn number of rows, where n is supplied extenally.

c)          What is the difference between break and continue statement ? Explain with example.                                                          5 + 5

What is subscripted variable ?

Explain “C doesn’t support Bound Checking”.

Write a complete C program to convert a decimal number consisting of arbitrary number of digits into its binary form using 1-D array.

Write a complete C program to find out the Trace of a square matrix [Trace means the sum of Principal Diagonal Elements].          2 + 3 + 5 + 5

What is recursion ?

What is the difference between recursion and iteration ?

Write a function (Recursive/Non-Recursive) power (a, b) that can calculate ab for any floating a and positive integer b. Invoke this function into main ( ) function to calculate xn .

Write a C function to find the length of a string and call the function from the main ( ) function. Do not use ‘strlen’ function in your program.    2 + 3 + 5 + 5

  1. a) Explain with suitable example, the difference between

structure and union in a C program.

b)           Suppose you have to create and maintain a Record Book of your company. Record Book consists of the following fields : (a) Employee’s Name (b) Id Number (c) Salary Amount (d) Designation. How do you create and maintain this Record Book for 150 Employees of your organization if your management asks to see the salary of any particular employee ?

c)            Explain Call-by-Value and Call-by-Address with examples.    3 + 6 + 6

  1. a) Write a C program that will receive a file name and a

line of tekt as command line arguments and write the text to that file.

b)           Convert the following :

(3F>\)16 to Octal                                           *

(742)8 to Binary

(10110 • 0101)2 to Decimal

c)            Represent the following expression using Logic Gates :

S              = (AX + BY) + (CD+EF)

12. Write short notes on any three of the following .

a)                 Dynamic allocation of the memory

b)                 Bitwise Operator

c)                  Pointer Arithmetic

d)                 Functions of Memory Unit of a Digital Computer

e)                 Array of Structure

f)                    Pointer to function and Function returning a Pointer.

Leave a Comment