You are on page 1of 5

I B.Tech.

IT- B (2011-12)

Auroras Scientific Technological and Research Academy

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)

Explain the working of Unary Operator with example.


Explain the working of Binary Operator with example.
Explain the working of assignment Operator with example.
Explain the working of ternary Operator with example.

(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)

Draw a Flowchart for the following


The average score for 3 tests has to be greater than 80 for a candidate to qualify for the interview.
Representing the conditional logic for generating reject letters for all candidates who do not get the
required average & interview call letters for the others.
b) Explain the basic structure of C program.
(Feb 08)

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.

a) Write about space requirements for variables of different data types.


b) What are the logical operators used in C and illustrate with examples.
(Apr/May/Aug/Sep 07, Feb 08, Aug/Sep 07)

UNIT II
1.

What are the differences between signed and unsigned data types, list out them?

2.

a) Explain the types of operators available in C?


b) Write a C program with Exclusive OR operation between the two integers and display the result?
(Dec 11, Jan 12)

233

(Dec 11, Jan 12)

I B.Tech. IT- B (2011-12)

Auroras Scientific Technological and Research Academy

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.

a) Write a C program to do Matrix Multiplications.


(Jun 09)
b) Write in detail about one dimensional and multidimensional arrays. Also write about how initial values
can be specified for each type of array?

21.

What is recursion? What is its advantage?

(May/June 06)

35.

Distinguish between the following:


i. Actual and formal arguments.
ii. Global and local variables.
iii. Automatic and static variables.

36.

Explain in detail about pass by values and pass by reference. Explain with a sample program

(Nov/Dec 05)

51.

Write a program to find the largest element in an array.

(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?

(Dec 11, Jan

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.

a) Explain different categories of functions in C with simple illustrative examples?


b) Write a C program using functions to calculate the factorial of a given number?

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.

Define an array. What are the different types of arrays? Explain.

234

(Jun 09)

I B.Tech. IT- B (2011-12)

Auroras Scientific Technological and Research Academy

14.

What is a pointer? List out the reasons for using pointers.

(May/June 06)

19.

What is a pointer? How is a pointer initiated? Give an example.

(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.

a) Write a C program using pointer for string comparison.


b) Write a C program to arrange the given numbers in ascending order using pointers.

(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.

a) Write a C program to find factorial of a given number using pointers.


b)Write a C program to arrange the given names in alphabetical order using pointers.

(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.

a) Describe the features of pointers? Explain an array of pointer with an example?


b) Write a C program to accept string using character pointer and display it?
b) Write a C program to swap two integers using functions.

(Dec 11, Jan 12)


(Dec 10)

9.

18. a) How to compare structure variables? Give an example.


(Feb 08)
b) Define a structure type struct ABS, that contains name, age, designation, and salary. Using this structure,
write a C program to read this information for one person from the keyboard and print the same on the
screen.

22.

a)

Distinguish between an array of structures and an array within a structure. Give an example each.

235

I B.Tech. IT- B (2011-12)

Auroras Scientific Technological and Research Academy

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.

a) Write a C program to illustrate the comparison of structure variables.


b) What is the use of a structure? Given an example for a structure with initialized values.

(Apr/May 07)

26.

a) Describe nested structures. Draw diagrams to explain nested structure.


(Apr/May 07)
b) Write a program to declare pointer as members of structure and display the contents of the structure.
Define a structure object, boy with three fields: name, age and height

33.

a) Explain the different ways of passing structure as arguments in functions.


(May/Jun 04)
b) Write a C program to illustrate the method of sending an entire structure as a parameter to a function.

UNIT V
4.

Explain the following with examples.


a) Self referential structures
b) Typedef
a) Enumerated types.

(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.

a) Explain what is a text file and what is a binary file.


b) Write a complete C program for finding the number of words in the given text file. Assume that the
words are separated by blanks or tabs.
(June 11)

20.

a) Write a C program to sort given integers using partition exchange sort.


b) Derive the time complexity of partition exchange sort.
236

(Feb 08)

I B.Tech. IT- B (2011-12)

Auroras Scientific Technological and Research Academy

21.

a) Explain the algorithm for exchange sort with a suitable example.


b) Compare sort and exchange sort

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.

Write in detail about the following:


a) Selection sort

(May/Jun 08, Aug/Sept 07)

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.

a) Write an algorithm or program for sorting integers using bubble sort.


b) Show the bubble sort results for each pass for the following initial array of elements.
3 5 18 7 1 2 5 23 16 3 1

(Dec 11, Jan 12)

a) Explain bubble sort with the algorithm or a C program.


b) Illustrate the results of bubble sort for each pass, for the following initial array of elements:
68 67 99 33 122 200

(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.

a) Explain what is stack and the operations performed on stack.


b) Explain how a stack be implemented using arrays

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

You might also like