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

PROGRAM
B.Sc IT
SEMESTER
FIRST
SUBJECT CODE & NAME
BT0065-C Programming and Data Structures
CREDIT
3
BK ID
B0949
MAX.MARKS
60

Note – Answer all questions. Each question is followed by evaluation scheme.
Q.1 Why data types are required in any programming language? Explain in detail the primary data types of C language.
Answer: - Data types are required in any programming language:- a data type or simply type is a classification identifying one of various types of data, such as real, integer or Boolean, that determines the possible values for that type; the operations that can be done on values of that type; the meaning of the data; and the way values of that type can be stored.
Data types are used within type systems, which offer various ways of defining, implementing and using them. Different type systems ensure varying degrees of type safety.
Almost all programming languages explicitly include the notion of data type, though different languages may use different terminology. Common data types

Q.2 Explain the structure of the C program.
Answer: - Structure of the C program:- 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.

Structure Definition in C

Q.3 i. What is recursion?
ii. Differentiate between recursion and iteration.
iii. Write a program to generate Fibonacci series using recursion.
Answer:- Recursion:-
Recursion is the process of repeating items in a self-similar way. For instance, when the surfaces of two mirrors are exactly parallel with each other, the nested images that occur are a form of infinite recursion. The term has a variety of meanings specific to a variety of disciplines ranging from linguistics to logic.
 The most common application of recursion is in mathematics and computer science, in which it refers to a method of defining functions in which the function being defined is applied within its own definition.

Q.4 What do you mean by dynamic memory allocation? Explain the three functions for dynamic memory allocation in C language.
Answer: - Dynamic memory allocation:- Dynamic memory allocation is when an executing program requests that the operating system give it a block of main memory. The program then uses this memory for some purpose. Usually the purpose is to add a node to a data structure. In object oriented languages, dynamic memory allocation is used to get the memory for a new object.
The memory comes from above the static part of the data segment. Programs may request memory and may also return previously dynamically allocated memory

Q.5 Write C program to implement stack using arrays.
Answer:- C program to implement stack using arrays:-



Q.6 What do you mean by binary tree? Explain the storage representations of binary tree.
Answer: - Binary tree:- a binary tree is a tree data structure in which each node has at most two children, which are referred to as the left child and the right child. A recursive definition using just set theory notions is that a (non-empty) binary tree is a triple (L, S, R), where L and R are binary trees or the empty set and S is a singleton set.[1] Some authors allow the binary tree to be the empty set as well.[2]
From a graph theory perspective, binary (and K-ary) trees as defined here are actually arborescences.[3] A binary tree may thus be also called a bifurcating arborescence[3]—a term which actually appears in some very old programming books,[4] before the
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.