We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 5
Paper CS 109— Computer Fundamentals and
Programming
TIME ALLOWED : THREE Hours
| Maximum Marks— 60
| Attempt six questions in all, selecting two questions from
each Section. All questions carry equal marks.
Section A
1. (a) Perform the following conversions :
| (i) (AB2F),, = (),
| ii) (754), = Cio ¢
Gi) 111 1000110), = (2),
(iv) CB.C4),, = io 4
(b) Draw block diagram of computer and explain functions
of its components in brief. 5
(c). Draw diagram and write truth table of XOR gate. 1
2. (a) Describe flowchart and various notations used to draw
eememticmncniaesiniinlitialinia! OCcheck whether a given number is Negative, positive or
zero. 5.
(b) Differentiate between the following :
G) Compiler and interpreter
(ii) High level and low level languages
(ii) BCD and EBCDIC. 3
(c) State and prove the De-Morgan’s theorem,
- (a) Differentiate between internal and external DOS commands,
Write syntax and purpose of following DOS com-
mands:
@ Copy
(i) Type
Gii)Ren 4
(b) Perform the following binary operations :
@ (100001 11001), + (11 110001111),
Gi) (11 00111), - (1111000),
(iii) Subtract 111011 from 11001 using one’s comple-
mentary method. 4
(c) Define Operating system and write its functions, 2
Section B
+ (a) Write a ‘Cc’ Program to sort a given list of numbers
using selection sort, 4
(b) Consider the Siven code fragments:
G) What will be the Outputs of the following code
meme CORDES? Tite(i) Rewrite each of the following for loops to while
loops +
(i) int i= 9; for(i -—;i-+i-) printf(“%d", 1);
(2) forG scanf(“%ed", &m) != shy)
printi(“%d “, m); 6
(a) Hana HES ee de each a ne:
k = 2, write the order of evaluation of all the operators,
and also-evaluate the following expressions :
@ y= _pecfdsae/f-gthk
(i) z= bl @—b te) +da&é& ¢ - £3. 6
(b) Why is the use of the goto statement generally
discouraged? Under what conditions (4) might the goto
statement be helpful? ‘What types of usage should be
avoided and why? Justify your answer by considering
a suitable example. 4
(a) Write a C program to print the following pattern :
i
2 1
Beek
4 32 1 5
(b) Write syntax and purpose of following String func-
tions :
(i) strepy
(ii) stremp f 2
What will be the output of the following ‘C’ prog-#include
void main( )
{
printf(“%15s \n", “Banasthali”);
Printf("% 8.35 \n”, “Banasthali”);
Printf(“%2d \n”, 2394);
Printf(“%8.2An”, 85.673);
}
Justify your answer. 3
Section C
7. (a) What is structure? Create a Structure named ‘Book?
with fields author, title, and price. Write aC program
to read and write a structure ‘Book’, 4
(6) Explain the following by Considering suitable exam-
ples :
(i) static storage class
Gi) formal Parameters and actual Parameters, 6
8.. (a) Define Pointer. What will be output of the following
code fragment?
void fun(float *p, float x)
void main( )
[SESS ere | Ses een area ew Mee). gedfloat af ] = {10, 12, 5, 215
int i;
for (i=0; 1 <=3; i++)
fun(a + i, i);
for (i=0; i<=35 i++)
printi(“%d”, ail);
}
Justify your answer. 5
(b) Define recursion. Write recursive function to find
factorial of a given number. a
9, (a) Write a C program to print the Fibonacci series using
call by value. 6
(b) Explain the following by considering suitable exam-
ples :
(i) enumerated data type
(ii) typedef data type- 4