BT0065, C Programming and Data Structures

Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :

“ help.mbaassignments@gmail.com ”
or
Call us at : 08263069601
(Prefer mailing. Call in emergency )



ASSIGNMENT

SPRING
2014
PROGRAM
BSc IT
SEMESTER
FIRST
SUBJECT CODE & NAME
BT0065, C Programming and Data Structures
CREDIT
3
BK ID
B0950
MAX. MARKS
60



Note: Answer all questions. Kindly note that answers for 10 marks questions should be approximately of 400 words. Each question is followed by evaluation scheme.


1 Explain the structure of the C program.
Answer : Structure is the collection of variables of different types under a single name for better handling. For example: You want to store the information about person about his/her name, citizenship number and salary. You can create these information separately but, better approach will be collection of these information under single name because all these information are related to person.


2 What is recursion? Differentiate between recursion and iteration.
Answer : Recursion is a programming technique that allows the programmer to express operations in terms of themselves. In C, this takes the form of a function that calls itself. A useful way to think of recursive functions is to imagine them as a process being performed where one of the instructions is to "repeat the process". This makes it sound very similar to a loop because it repeats the same code, and in some ways it is similar to

3 Define array and explain its need. Write a program to calculate sum and average of the elements stored in an array.
Answer : A collection of variables which are all of the same type. It is a data structure, which provides the facility to store a collection of data of same type under single variable name. Just like the ordinary variable, the array should also be declared properly.

4 Explain Union. Differentiate between structure and union

Answer : Unions are quite similar to the structures in C. Union is also a derived type as structure. Union can be defined in same manner as structures just the keyword used in defining union in union where keyword used in defining structure

5 What is data structure? Explain abstract data type in brief. Differentiate between linear and nonlinear data structure.
Answer : A data structure is a method for organizing and storing data, which would allow efficient data retrieval and usage. Linear data structure is a structure that organizes its data elements one after the other. Linear data structures are organized in a way similar to how the computer’s memory is organized. Nonlinear data structures are constructed by attaching a data element to several other data elements in such a way that it reflects a specific relationship among them. Nonlinear data structures are organized in a different way than the computer’s memory.



6 What is linked list? Explain the advantages of linked lists over array.            

Answer :An array stores elements in successive order in memory, i.e. it looks like follows:


--------------------------------------------------------------------------------------
|  item 1  |  item 2  |  item 3  |  ...  ...  |  item x  | //here comes other stuff
--------------------------------------------------------------------------------------

This means, elements are one after another
Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :

“ help.mbaassignments@gmail.com ”
or
Call us at : 08263069601
(Prefer mailing. Call in emergency )



No comments:

Post a Comment

Note: Only a member of this blog may post a comment.