Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Download
Standard view
Full view
of .
Look up keyword
Like this
12Activity
0 of .
Results for:
No results containing your search query
P. 1
Data Structures

Data Structures

Ratings:

4.5

(1)
|Views: 1,391|Likes:
Published by api-3817493

More info:

Published by: api-3817493 on Oct 17, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

03/18/2014

pdf

text

original

Code No: RR10203
Set No.1
I B.Tech. Regular Examinations, January -2005
C & DATA STRUCTURES

( Common to Electrical & Electronic Engineering, Electronics &
Communication Engineering, Computer Science & Engineering, Electronics
& Instrumentation Engineering, Bio-Medical Engineering, Information
Technology, Electronics & Control Engineering, Computer Science &
Systems Engineering, Electronics & Telematics, Electronics & Computer
Engineering, Instrumentation & Control Engineering and Bio-Technology)

Time: 3 hours
Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
\ue000 \ue000 \ue000 \ue000 \ue000
1. (a) What are constants?
(b) Name the di\ufb00erent data types that C supports & explain them in detail?
2. (a) Write a C program to do Matrix Multiplications.
(b) Write in detail about one dimensional and multidimensional arrays. Also write
about how initial values can be speci\ufb01ed for each type of array?
3. (a) How are Structure elements accessed using pointer? Which operator is used?
Give an example.
(b) Write a program to use structure within union. Display the contents of struc-
ture elements.
4. (a) Write a \u2018C\u2019 Program to compute the sum of all elements stored in an array
using pointers.
(b) Write a \u2018C\u2019 program using pointers to determine the length of a character
string.
5. Write a C program using pointers to implement a stack with all the operations.
6. (a) What is the di\ufb00erence between linked list and an array?
(b) Write a \u2018C\u2019 program to reverse the elements in a singly linked list.
7. Construct a binary tree for the following preorder and inorder traversals. Explain
with a neat diagram:
(a) Preorder : ABDIEHJCFKLGM
Inorder : DIBHJEAFLKCGM
(b) Preorder: ABDEFCGHJLK
Inorder : DBFEAGCLJHK
8. (a) Write and explainlinear search procedure with a suitable example.
(b) Formulate recursive algorithm forbinary search with its timing analysis.
\ue000 \ue000 \ue000 \ue000 \ue000
1 of 1
Code No: RR10203
Set No.2
I B.Tech. Regular Examinations, January -2005
C & DATA STRUCTURES

( Common to Electrical & Electronic Engineering, Electronics &
Communication Engineering, Computer Science & Engineering, Electronics
& Instrumentation Engineering, Bio-Medical Engineering, Information
Technology, Electronics & Control Engineering, Computer Science &
Systems Engineering, Electronics & Telematics, Electronics & Computer
Engineering, Instrumentation & Control Engineering and Bio-Technology)

Time: 3 hours
Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
\ue000 \ue000 \ue000 \ue000 \ue000
1. (a) What is a Flowchart? Explain the di\ufb00erent symbols used in a Flowchart?
(b) Write a program to \ufb01nd the maximum and minimum of given numbers.
2. (a) In what way array is di\ufb00erent from an ordinary variable?
(b) What conditions must be satis\ufb01ed by the entire elements of any given array?
(c) What are subscripts? How are they written? What restrictions apply to the
values that can be assigned to subscripts?
(d) What advantage is there in de\ufb01ning an array size in terms of a symbolic
constant rather than a \ufb01xed integer quantity?
(e) Write a program to \ufb01nd the largest element in an array.
3. (a) How are Structure elements accessed using pointer? Which operator is used?
Give an example.
(b) Write a program to use structure within union. Display the contents of struc-
ture elements.
4. (a) Explain the process of accessing a variable through its pointer. Give an Ex-
ample.
(b) Write a C program using pointers to read in an array of integers and print its
elements in reverse order.

5. Show how to implement a queue of integers in C by using an array int q[QUEUESIZE] , where q[0] is used to indicate the front of the queue , q[1] is used to indicate its rear and where q[2] through q[QUEUESIZE -1] contain elements on the queue. Show how to initialize such an array to represent the empty queue and write routines remove, insert and empty for such an implementation.

6. What is Circular doubly linked list? Explain the various operations on Circular
doubly linked lists with suitable algorithms.
7. Write an algorithm for each of the following:
(a) Inorder traversal
1 of 2
Code No: RR10203
Set No.2
(b) Preorder traversal
(c) Postorder traversal
8. Write a C program that searches a value in a stored array using binary search.
What is the time complexity of binary search?
\ue000 \ue000 \ue000 \ue000 \ue000
2 of 2

Activity (12)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Ephraim Njoroge liked this
naveenkaalai liked this
dhruba717 liked this
Tam Sui Thaa liked this
shivagowdain liked this
Denis Otim Acire liked this
hiren_7 liked this
chandana318 liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->