How To Exam?

a knowledge trading engine...


West Bengal Institute of Technology (WBIT) 2008-2nd Sem B.Tech Computer Science and Engineering Computer Science - Basic Computation

Wednesday, 17 July 2013 06:35Web



i

BNGINJEfcJNG at MANAGEMENT EXAMINATIONS, JUNE INTRODUCTION TO COMPUTING SEMESTER-2

- 2006



CS/r.TBOK e IK; 2/C8 -Ca/O.




Tima : 3 Hours ]

Full Marks : 70


GROUP - A ( Multiple Choice Type Questious )


Choose the correct alternatives for any ten of the following : i) RAM stands tor

a) Rec.dw:te Access Memory

c) ;*a,ido! Access Memory u) Opti Kcliig syacem is

a) application software c) both of these ill) aLU Is a part of a) memory c) ;nj. 4i cl. vice v; The outpaL of the following code Is : for (1= I ;i<=5;!! +

{

If (i%2)    

comiaue; printf ("%d", 1);


10 x 1 * 10


1.


Read Access Memory None of 'these.

system software none of these.

CPU

output device.


b)

d)

b)

d)

b)

d)


}

b) 13 5 d) none of these.


a) 1 2 3 4 5

C) Z 4

[Tl-22lOl4n

v)    The output of

int 1-5,

priiiif ("%d %d %d", i, i++, ++i);

is

a 55 7    b) b 6 7

0 7 6 5    d) 7 6 6.

vi)    The output of #defiiie SQ(x) x*x void main()

r

int a,b:    .

c*~SQ (a+2);    .

printt("%d", b);

) is

a) -49 .     b) -17

c) 7    d) none of these,

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

a)    b) >=

r


c)    ' d) &L-:.

viii) The ciiiput of

fact-1;

for (i=l;i<5;i++);    '

ft;ctsiact*i;

piiiitiV'%d", fact);

is

a) 24    b) 5

c) \ finite loop    d) none of these

ix)    The output, of /old m;iin( )


{ . int arr [6j={20, 25};

printf ("%d %d %d", arr [2], arr (3J, arr[4]);

! -

' *S    '    .

a) 0 0 0    b) 20 25 0

c) 25 0 0    d) none of these.

x)    The purpose of mode rs- is to

a)    opt a xOi only reaaing

b)    open for only writing

c)    open ;o both reaulug and writing

d)    none of these.

xi)    Pointer is

a)    u variable containing the address of a variable

b)    a value

c)    a memory location .

d)    none of these.

xii)    A function may contain

a)    one return statement

b)    two return statements

c)    .ao.e than two rca.n statements

C


d) none of ihase.

GROUP -B (Short Answer Type Questions )

Answer any three of the following.

3x5 = 15


2 a) What are ii*t basic features of an algorithm ?

t Write an algorithm to find largest among three numbers taken as input.

Wnat are the disadvan rages of machine language ?

2


c8/B.racH/8BM-a/cs-aoi/oe    D    !'

3.    With a suitable block diagram, briefly explain the major components and thcu functions of any conventional computer system.

4.    u) Write a function power (a,b) to calculate the value of a raised to b

b) What will be the output ?

void fun(int*i, int*j);

int i=5, j=2;

fun(&i,&J);

printf ("\n%d %dM, i, J);

ran (inti, int*])

*i=*i**i;

2 + 3

1


5. a) What is dynamic memory allocation ?

2


L) Write cowr. the differences between mailoc ( ) and calloc ( ).

2


c) Write do At. the differences between structure ana union.

What t.rc ti ciiierences between recursior. and iteration,

6,


b) Write t. recvirsive C function to calculate factorial of a number.

in.aaa85.iWl

GROUP -C ( Vong Answer Type Questions j

3-15 - .5



7


O4./B.TBCH/81CM-2/C8-201 /lb


Answer any three of the following questions.

7.    a) Write down the differences between compiler and interpreter.    2

b)    What is an operating system ? Write down the basic features and opt .<ons of an operating system.    5

c)    Perform the following operations :    

i)    Convert (100110101)2 to octal

ii)    Convert (536)8 to hexadecimal

iii)    Convert (23-78)10 to binary

iv)    Subtract (7)l0 from (17)10 in binary using 2's compleiocnt

8.    a) Write a C program to find the largest and smallest among a list of n numbers

5


taken as input.

b)    Write a C' program to check whether a string takan as input is a palindrome or

net.    5

c)    Write a C i rogram to print the following pattern ( till n ton*, where n is taker s

input).

1

23 2

34543

4 5 6 7 6 5 4

9. a) Explain call by value and call by reference mechanism for passing axgv nic .ts

into a function a function call. Write a C lui.cnoa to svap the values of two

integer variables passed as arguments. Also write the main functin.

fc


[p-s&ariii (4)

C8/B.TECH/8EM-2/CS-201/C8    8    ;

b) Define a structure called cricket that will describe the following information ; Player name team name batting average

f

f


Using cricket, declare an array player with SO elements and write a program :o read the information about all the 50 players and print the name of the piayr; having highest batting average.    j

10. a) Write a C program that will receive a filename and a line of text as commas id line arguments and write the text to the file.

b)    Write down the differences between while and do-while.    

c)    What is type casting ? What is automatic type conversion ?    3

A. a) What is the difference between iterative fuuc-tlon and recursive function

b) Write a C program to find factorial of a number using iterative function wt 1 a recursive function,    3 + ( 6 , 6

END

i

H-222811 III







Attachment:

( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER West Bengal Institute of Technology (WBIT) 2008-2nd Sem B.Tech Computer Science and Engineering Computer Science - Basic Computation