Data Structure using C

advertisement
1 of 4
BCA (New) II Semester Assignments for February 2009 Session
Subject Code
: BC 0038
Assignment No: 01
Subject Name
: Data structure Using C
Marks : 40
Credits: 04
Books ID: B 0701
1. Define data structure ? Explain its three components
(5 Marks)
2. You are asked to store Names of all 100 students of BCA-II semester in your
Learning Centre. Which data type do you use? What is its syntax?
(7 Marks)
3. You are asked to store Age of all 100 students of BCA-II semester in your
Learning Centre. Which data type do you use? What is its syntax?
(7 Marks)
4. Let us say your Learning Centre decides to store all the three types of student
data:
a. Register-Number
b. Name
c. Age
In a single data type, which is the most suitable data type? Give its syntax
(7 Marks)
5. Your LC code is stored in a memory location as shown and the variable name is
LC:
(7 Marks)
LC Memory
address
1000
Content(LC code)
9000
If the memory address of your LC code is stored in a variable called SMU as shown:
SMU
Content(LC Address)
3000
1000
List out the various ways in which LC code can be accessed.
6. Explain how stacks are useful in evaluation of arithmetic expressions with an
example. (7 Marks)
2 of 4
3 of 4
BCA (New) II Semester Assignments for February 2009 Session
Subject Code
: BC 0038
Assignment No: 02
Subject Name
: Data structure Using C
Marks : 40
Credits: 04
Books ID: B 0701
1. When is Dynamic memory allocation more suitable? Write a simple program
using dynamic memory allocation to construct a singly-linked list with following
functions:
( 12 Marks)
Create ()
Insert ()
Remove ()
Traverse()
IsEmpty()
IsFull()
2. Discus the doubly linked list wuth neat diagram.
(8 Marks)
3. For the following Graph, Write its equivalent Adjacency list and Adjacency Matrix.
(10 Marks)
A
B
D
F
C
E
4 of 4
4. Using Binary Search technique find search for Sweden in the following array of
countries. Write complete algorithm.
0
1
2
3
4
(10 Marks)
5
6
7
8
9
Afghanistan Australia Burma Ceylon Denmark Ethiopia India Switzerland Sweden Uganda
Download