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

WBUT Question Papers EE

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

Time Allotted : 3 Hours

Full Marks : 70

The figures in the margin indicate full marks. Candidates are required to give their answers in their own words

as far as practicable.

GROUP – A ( Multiple Choice Type Questions )

1. Choose the correct alternatives for the following : 10×1 = 10

i)               The purpose of mode r+ is to

a)              open for only reading

b)              open for only writing

c)              open for both reading and writing

d)             none of these.

ii)          Pointer is

a)              a variable containing the address of a variable

b)              a value

c)              a memory location

d)             none of these.


iii) A function may contain

a)            one return statement

b)            two return statements

O      more than two return statements d) none of these.

IV) Which of the following is not used as secondary storage ?

a)           Semiconductor memory

b)           Magnetic discs

c)           Magnetic drums

d)           Magnetic tapes.•

v} The ALU of computer normally contains a number of high speed storage elements called

a)           semiconductor memory

b)           registers

c)           hard disc

d)          magnetic disc.

vi)         The register which contains the instructions that are two execute is known as

a)            Index register

b)            Instruction register

c)            Memory address register

d)            Memory data register.

vii)       A 32 bit microprocessor has the word length equal to

b)            4 bytes

d)           8 bytes.

viii)     The union holds

a)           one object at a time b) multiple objects

c)           both (a) and (b)

The minimum number of auxiliary variables required in a swap routine in C language to interchange two

variables is

a)           0

c)            2 x) Language C uses

a)           call by value

c)            call by name

d)           indeterminate.

b) call by reference

d)           none of these.


[ Turn over

GROUP -B ( Short Answer Type Questions )

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

  1. If K bytes are required to store a number in hexadecimal number system, find how many bytes will be required to

store the number in binary number system ?

  1. If C, and C2 are two computer languages, what do you mean by the statement. “The level of language C, is higher than that oi Cz. Is it possible to convert the language of a
  2. particular level into another language of other level ? If so,

how ? If no, why ?

  1. Write a program in C to compute the average of a few input quantities with minimum use of storage variables, where the number of inputs is not known beforehand.
  2. a) What is recursion ?
  3. b)           What do you mean by pointer arithmetic ? Explain with

example. f                                                                                                       2 + 3

  1. a) Why do we use functions in programming ?

b)       Write a function prototype which accepts an integer, a float pointer, a string and a structure pointer as


How do you access a structure variable through a

structure pointer ? Explain with example 1 — + 11 + o


GROUP -C ( Long Answer Type Questions )

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

  1. a) Explain two input Exclusive NOR gate using truth


b)   Why is NOR gate called universal gate ?

c)           Simplify :

( A + B )•( A C } + ( A- B + A C }*( A + D )

d)       Convert the following :

11 (2AD),6 – ( )2

ii)    (l 1100111101) – ( )



  1. a) Draw a block diagram of a computer and briefly explain its various components. Is it possible to realize a digital computer without a primary memory ? Justify. 5 + 3

bj What is the significance of different levels of computer language ?

c)  Distinguish between compiler and interpreter.

  1. a) Allocate a two-dimensional array dynamically using
  2. pointers in C language.
  3. b)          What is the utility of break statement in loop ? Give an

example. How is break statement different from an exit

( ) statement ?                                                             2 + 2

c)           Write a program in C to find all the prime numbers in the range 10 to 100.                                                                      6

  1. a) Write down the difference between malloc ( ) and

calloc ( ).                                                                           2

b)           What are auto, extern and static variables ? Explain

their uses with suitable example.

c)           Write a program to read a file and display its contents

along with line number before each line.


  1. a) What are the differences between recursion and iterations ?


b)          Write a C program to print the following pattern

( till n rows, where n is taken as input )

c)           Create a structure to specify data on students give below I


Roll Number, Name, Department, Course, and Year of admission.

Assume that there are not more than 450 students in


Write a program to print names of all students who joined in a particular year.                                                                            7

Leave a Comment