Get fully solved assignment, plz drop a mail with your sub code
computeroperator4@gmail.com
Charges rs
125/subject and rs 700/semester only.
our website is www.smuassignment.in
if urgent then call us
on 08791490301, 08273413412
[Summer 2014]
ASIGNMENT
PROGRAM-BSc
IT
SEMESTER-FIRST
SUBJECT
CODE & NAME-BT0065, C Programming and Data Structures,
CREDIT-3
BK ID-B0949
MAX.
MARKS-60
Q1.Why
data types are required in any programming language? Explain in detail the
primary data types of C language. 4+6
Answer.
Need
of data types in any programming language
Data type is essential
when we define a variable. Because when variable is defined we must maintain
the data type along with the variable so that it possible to allocate the
memory space.
Let us consider the
analogous example of cooking. At the time of defining a container we must
define its capacity.
Q2.
Explain the structure of the C program. 10
Answer.
Structure
of the C program
We
have to follow
the sequence of instructions that should be maintained to be a C Programmer.
Q3. i.
What is recursion?
ii.
Differentiate between recursion and iteration.
iii.
Write a program to generate Fibonacci series using recursion.
Answer.
i. recursion
Recursion is a tool to
allow the programmer to reach a particular point called the recursion point.
The recursion wants to know “What to do? “. It executes from bottom to top approach.
It copies the function into the memory number of times. The function calling
track has been maintained by System Stack (Automatically Created by
Operating System).
Q4. What
do you mean by dynamic memory allocation? Explain the three functions for
dynamic memory allocation in C language. 4+6
Answer.
Dynamic
memory allocation
C Language requires
the number of elements in an array to be specified at compile time. Many
languages permit a programmer to specify an array‟s size at run time. Such
languages have the ability to calculate and assign, during execution, the memory
space required by the variables in a program. The process of allocating memory
at run time is called dynamic allocation of memory.
Language C has memory management functions so that memory can be allocated
dynamically. The three different functions used in dynamic memory allocation
are:
Q5.
Write C program to implement stack using arrays. 10
Answer.
C
program to implement stack using arrays
#include
<stdio.h>
#include
<process.h>
Q6. What
do you mean by binary tree? Explain the storage representations of binary tree.
4+6
Answer.
Binary
tree
A binary tree is
a tree in which no node can have more than two subtrees. In other words, a node
can have zero, one, or two subtrees. In other words, a tree in which every
parent has one or two children (but not more than that) is called as binary
tree. The “root” component of binary tree is the forefather of all
children. But it can have only upto two children one “right” child
and “left” child. These children can become fathers and each can produce
only two children. In fact a child can become a father, grandfather, great
grandfather and son. Fig shows five binary trees all
Get fully solved assignment, plz drop a mail with your sub code
computeroperator4@gmail.com
Charges rs
125/subject and rs 700/semester only.
our website is www.smuassignment.in
if urgent then call us
on 08791490301, 08273413412
No comments:
Post a Comment