Csen 1201
Csen 1201
Csen 1201
In put Output
B.Tech/AEIE/BT/CE/CHE/CSE/ECE/EE/lT/ME/2nd Sem/C$EN.1 201/2016 B X
2016
0 0 0 0
INTRODUCTION TO COMPUTING
(csEN 1201) 0 0 1 I
GROUP . B
3. Linker takes one or more object files generated by
Compiler and combines them into a single executable 2. (a) Show the memory content of (17625)10, using IEEE
file library file or another object file. 754 floating point (32 bits) representation'
(a) (1) & (2) (b) only (2) (b) Justi!, why the range of signed short integer (2 bytes)
(c) (2) & (3) (d) only (3) is -32768 lo +32767 .
(c) Calculate the following in binary 2's Complement Sign-
ix) Variable p is a pointer to a two dimensisonal array of
Magnitude form : (19).,0 + (-25).,0
integers i.e. int arr[3][4]; Then which of the following
should oe the prototype of a function named funO, if (d) The n{h term of the Fibonacci series is defined as'
the 2D array "arr" is an argument to the function fun0 Fn = Fn-t + Fn-2;Fo = 0' Fl = 1'
and "rows" indicate the number of rows of the array
"arr" Draw a flowchart to display Fn, the n-th term of series
(a) void fun(int*P[4], int rowsX ] 3+3+3+3 = 12
(b) void fun(int.p)[4], int rows){ } 3. (a) Simpliry the following expression into sum of prodrcts
(c) void fun(int p[ ][4]' int rowsX ] using kamaugh map F(A, B, C, D) = t(1, 3, 4, 5' 6' 7 '
9, 12, 13).
(d) both of (b) and (c)
(b) Simplify the Boolean function :
x) For the logic circuit shown in the figure, the required
input combination (A, B, C) to make the output X = 1 is A1n + a1 +(B+AA)(A+ B)
(C) Show how a two input XOR gate can be constructed
only from 2 input NAND gate.
(3)+(1)+(2)+(2+4) = 12
GROUP. C
4. (a) a student who knows only the bit wise
' ' Say thereandis assignment
opeators operator in C- Now the student
wants to extract the last digit of a given integer number
(For example if the number is 123' the student will extract
(b) 0, o, in" OUit a). So how the student would be able to solve
(a) 1, 0, 1 1
the Problem in C?
(c) 1, 1, 1 (d) 0, 1, 1
Turn over]
csEN 120'l lTurn overl csEN 1201 I
B.TecruAElE/BT/CE/CHE/CSE/ECE/EE/lTlME/2nd Sem/CSEN-1 201 /201 6 B.Tech/AEl E/BT/CE/C HE/CSE/ECE/EE/IT/ME/2nd Sem/CSEN-1 201 1201 6
5+7 = 12 1
s (a) State the difference between explicit and implicit type (b) Write a recursive C program to find the GCD of tlvo
casting with an example. numbers given by user (N.8. write only the recursive C
function definition) Now write an iterative C program to
(b) int mainQ
solve the same problem and state which one will you
{ prefer to solve the problem and why.
char c = "A"; 6+(3+3) = 12
intx=c; 7 (a) lmplement the following function with the prototype given
below
x = x<<2;
int exponent(int x, int y);
printf("%d",x);
This function will evaluate and return xv if there is no
ptintf("o/od",xl2 ++ +x); overflow. Otherwise in case of overflow (i.e. value out of
print("%d",x%200); range for integer), the function will return 0.
(b) Explain call by value and call by reference with a suitable
return 0;
example.
) (c) What is command line argument? ls it a call by value or
Now state and explain what happens if the above C call by reference explain your answer.
code is executed.
6+3+(1+2) = 12
(c) State the difference between following two declarations
int- p(int x, chaf p), int(.p)(int x, chaf p)
4+4+4 = 12
GROUP . E
csEN t20l