Professional Documents
Culture Documents
IT- B (2011-12)
UNIT I
2.
a)
What is an algorithm? Write an algorithm to read five integers and find out if the values are in ascending
order.
b) Draw a flow chart to read ten integer values and print the sum of squares of the values.
(June 11)
6.
a)
9.
a) List the activities involved in each phase of waterfall system development life cycle model?
b) What are the different types of errors one can encounter during the program execution?
Explain and specify the interactions between various components that support the basic functionality of a
computer?
b) Discuss in detail the program execution steps?
(Dec 10)
12.
a)
16.
a)
b)
c)
d)
Write a C program which reads temperature in either Fahrenheit or Celsius and compute temperature in
the opposite scale. Formulas are C = ( F - 32) * 5/9 , F = 9 (C/5) + 32
b) Write a C program to find greatest common division (GCD) of two given numbers.
(Jun 09)
17.
18.
(Dec 10)
(May/June 08)
What are the different types of control statements available C. Explain them with an example?
(May/June 08)
a) Write short notes on auto and static storage classes.
b) Write short notes on call by reference.
(May/June 08)
19.
a)
20.
a) What is the difference between signed integer and unsigned integer in terms of memory and range.
b) List the entire data types in C. What is the size of each of these data types?
(Feb 08)
21.
UNIT II
1.
What are the differences between signed and unsigned data types, list out them?
2.
233
b) Write a complete C Program to print all the prime numbers between 1 and n. Where n is the value
supplied by the user.
(June 11)
4
11.
21.
(May/June 06)
35.
36.
Explain in detail about pass by values and pass by reference. Explain with a sample program
(Nov/Dec 05)
51.
(Nov/Dec 05)
69.
What is a string? What are the different string handling functions available in C?
70.
What are array declarations (in contrast to array definitions) required in a C program? How do such
declarations differ from array definitions?
(Sep 03)
(April/May 06)
(Nov/Dec 05)
(June 02)
UNIT III
1.
a) What are the formatted and unformatted functions? What are the escape sequences?
b) Define Recursion? Write a C-Program to find the factorial of a number using Recursion?
12)
2.
a) Explain the following storage classes with examples: auto, register, extern.
b) Explain how two dimensional arrays can be used to represent matrices. Write C cofe to perform matrix
addition and matrix multiplication.
(June 11)
3.
a)
9.
What is recursion? Write a complete C program that reads a positive integer, calculate the factorial of the
number using recursion, and print the result.
b) Explain the facilities provided by the C preprocessor with examples.
(June 11)
(Dec 10)
10.
a) What is the use of struct keyword? Explain the use of dot operator? Give an example for each.
b) Write a C program to accept records of the different states using array of structures. The structure should
contain char state, population, literary rate, and income. Display the state whose literary rate is highest
and whose income is highest.
(Jun 09)
13.
234
(Jun 09)
14.
(May/June 06)
19.
(May/June 06)
27.
Explain the command line arguments. What are the syntactic constructs followed in C.
(May/June 06)
28.
Write a C program to read the input file from command prompt, using command line arguments.
(May/June 06)
29.
The roots of a quadratic equation of the form ax2+bx+c = 0 are given by the following equations:
(May/June 06)
X 1 b (b 2 4ac) / 2a
X 2 b (b 2 4ac ) / 2a
(June 05)
(Nov 04)
53.
(Nov 04)
54.
Write a C program that will receive the file name and line of text as command line arguments and write the
text to the file?
(Sep 03)
55.
(Nov 04)
a) Write a C program to find out the presence of a substring in a given string using pointers.
b) Write a C program to find the length of a given string using pointers.
(Nov 04)
56.
57.
a) Explain the process of accessing a variable through its pointer. Give an example.
(Nov 04)
b) Write a C program using pointers to read in an array of integers and print its elements in reverse order.
UNIT IV
1.
9.
22.
a)
Distinguish between an array of structures and an array within a structure. Give an example each.
235
b) Write a C program using structure to create a library catalogue with the following fields; Access number,
authors name. Title of the book, year of publication, publishers name, price.
(Feb 08)
23.
(Apr/May 07)
26.
33.
UNIT V
4.
(June 11)
5.
a)
Explain how complex numbers can be represented using structures. Write two c functions: one to return
the sum of two complex numbers passed as parameters, and another to return the product of two complex
numbers passed as parameters.
b) Explain the following with examples:
i) Enumerated types ii) Unions.
(June 11)
9.
a)
15.
Write a program for indexed sequential file for the employee database for the following operation.
a) Add Record
b) Delete Record
c) Search Record based on the department
What is an enumerated type? How it can be declared? What are the different ways one can initialize
enumerations?
b) Differentiate between self referential and nested structures with suitable examples?
(Dec 10)
(May 08)
UNIT VI
1.
a) Write C-language program that reads a C-program file and outputs number of lines in the program.
b) List and explain the streams functions for binary files along with their prototypes.
(Dec 11, Jan 12)
4.
20.
(Feb 08)
21.
32.
Trace through the steps by hand to sort the following list in Quick sort.
28 7 39 3 63 13 61 17 50 21
Write in detail about the following:
a) Exchange sort
b) Binary search
33.
(Feb 08)
(May/Jun 08)
(May/Jun 08)
34.
50.
Write a C program that searches a value in a stored array using binary search. What is the time complexity of
binary search?
(Jan 05)
UNIT VII
1.
2.
(June 11)
11.
List the advantages of doubly linked list. Write a program in C to perform the following operations in a
doubly linked list.
(Jun 09)
a) Search
b) print list forward
c) Print list reverse
19.
What is a singly linked list? Write a program to delete a node in front, rear and in a particular position and print
the list.
(Aug/Sep, 08)
UNIT VIII
1.
a)
2.
3.
Write an algorithm for evaluating postfix expression. Demonstrate your algorithm with stack contents for
each operation using the post fix expression 2 3 5 + *
b) Explain about i) Stack ii) queue.
(Dec 11, Jan 12)
(June 11)
What is a singly linked list? Explain with C code how the insertion deletion and searching operatins are
performed on a singly linked list.
(June 11)
237