You are on page 1of 2

\ollNo.

B. Tech

l-l-:

NATIONAL INSTITUTE OF TECHNOLOGY, KURUKSHETRA


\:
THEORY EXAMINATION

\\

Question PaPer

Month and Year of the Examination: NOV/DEC-2O13


Programme: B.Tech
Subject: CoEputer Engineering
Course No: CoT-1Of
Number of Questions to be attempted: 5
Total No. of Questions: 6

Semester: Ist

Maximum Marks: 50
Time ailowed: 3 Hours
Total No. of Pages used: 2

Unless stated otherwise, the symbols have their usual meanings in


context with subject. Assume suitably and state, additional data required,
if any. The .",-rdid.t"", before starting to write the solutions, should
pleasi check the question Paper for any discrepancy, and also ensure
ihut h^r" been delivered the question paper of right course no. and right
subject title.
Note: - Attempt all questions
L)

{a)

Interpretera

25

disadvantages

2'5

write any two differences between Compiler and

(b)What is recursion? write its advantages and

numerical:

2'5

(c) Solve the following


al [896)ro = (?)o
b) (110011+= (?)ro
rl [28.C4)rc = (?]io
d) (25.175Jr0 = [?)e
e) (1011.011)z = (?)ro
(d)

A live digit number is entered through the keyboard Write a


program in C to obtain the reversed number and also check

2'5

whether the original and teverse numbers are equal or not.

2)

(a)

write a program in C to add first N terms of the following series


usingforloop: II7l+2I2l +3/31 ........... .... ..... ...... .. N/N!

(b)

Give any two differences betrveen call by value and call

by

reference.

(c)

write a program in C to accept a string and convcrt all

(d)

Explain the significance of break statement


construct. What would result in its absence?

characters to upper case $'ithout using anl string function.

llPage

in switch-case

l\
)\

3)

(a)

write a program in C to compute cosine series as given


ra .:rt xt x'
f

B. Tech 1/2013

below:

2'5

-l -4l --bl ...-nl


21

nilr)-l-

(b) Write a program

in C to sort the vector elements in descending 2'5

order.
(c)

ls the statement within if construct given belo\i/ executed?


or why not?
i = 1;

Why

if( i=0)

printl("executed");

in our -co-mputer system?


expiain the differences bettveen different types of

Why computer
{d)'A1so

'

codes are important

computer codes.

4)

(aJ

write a program in C language to print the following

pattern:

zLz

34543
4567654
s67a9a765
(b)

Wrile a program

in C language

1o llnd factorial of

first ten

natural num bers using function

5)

Write a program in C to enter an alphanumeric string from the


user and calculates number of vowels and numerals in that
string.
(b) write a program in C language to read one matrix arld Iind the
sum of its diagonal elements.
'&' and the
[c) Explain the difference between address operator
bitwise operator '&'with exampie.
(al write a program in C to multiply two matrices.
ib)write a program in C language using function to swap two
numbers with call by reference concept.
.i \v.ite a program in C to find the sum of the squares of the
d:gits of a 5 digit number, using whiie loop

(a)

3
3

You might also like