How To Exam?

a knowledge trading engine...


West Bengal Institute of Technology (WBIT) 2008-2nd Sem B.Tech Electronics and Communications Engineering Electronics

Thursday, 18 July 2013 01:00Web



i

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


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

- 2006


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 fur

a) Rec.dw:te Access Memory

c) ;*a,ido! Access Memory

ii)    Opti Kciiig 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)


}

a) 1 2 3 4 5

C) Z 4


b) 13 5 d) none of these.


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) Vv'liicii 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++);    '

fe;ct*iact*i;

piiiitlV'%d", fact);

is

a) 24    b) 5

c) \ finite loop    d) none of these

C8/IS.TBCH/8!to-2/C8-20!/Ob


5


ix)    The output, of /old iuain( )

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

printf ("%d %d %ct", 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 reauing    ,

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) noue 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. reciir&ive C function to calculate factorial of a number.

in.aaa85.iWl

GROUP -C ( Vong Answer Type Questions j

3-15 - .5


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 ill) Convert (23-78)10 to binary

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

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 ( clli 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 Uit .ts

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

integer variables passed as arguments. Also write die 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 lino 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

1. a) What is the difference between iterative fuuc-tlon and recursive functior

b) Write a C program to find factorial of a number using iterative function wt ! 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 Electronics and Communications Engineering Electronics