Mca 102
Mca 102
Mca 102
Section - A
Q1) (15 x 2 = 30)
a) What are the advantages of data type int over data type double? What
are the advantages of type double over type int?
b) List any explain three computational errors that may occur in type double
expressions.
c) What is the difference in meaning between x3 and x[3]?
d) Identify the error in the following C statement
int x[8], i;
for (i = 0; i < = 8; ++i)
x[i] = i;
Will the error be defected? If so when?
e) What are the two common ways of selecting array elements for
processing.
f) Differentiate between dynamic and non dynamic data structures.
g) Input a date using C program and check if it is valid. Print messages
accordingly.
h) What is an array of pointers. Explain with examples.
i) How would you call a function scan_olympic passing competition as an
output argument.
j) Determine how may bytes are needed to store a structure of type
hair_info_t, assuming two bytes for an integer and one byte for a character.
k) Indicate how the pointers are used to establish a link between nodes.
l) Write the algorithmic steps for searching a binary search tree.
m) Explain opening and closing of files with examples.
n) What is dynamic memory allocation Explain in brief.
o) How bubble sort is different for selection sort.
P.T.O.
Section - B
(9 x 5 = 45)
Q2) Write a for loop that would print the alphabet in lowercase letters, assuming
that letters have consecutive codes.
Q4) Write a program to compute the mean and standard deviation of an array of
data and displays the difference between each value .
Q6) What is the primary difference between a structure and an array? Which would
you use to store the catalog desorption of a course and to store the names of
the students in the course.
Q7) Use pointer concept to write a program in C to find the length of a given string
including blank spaces, tabs and other special symbols (new line character
should be data as a string terminating character)
Q8) Write a short note on Dynamic Memory Allocation with suitable examples.
Q9) Write a program in C to input book code, Title and price. Give always a
discount of 10%, find the net price and print it. Do this for any number of
books.
Q10) Write a program in C to create and display a binary search tree of integer
keys.
Q13) Design an algorithm and draw its flow chart to convert a decimal number to
its hexadecimal equivalent.
J-3405[S-1261] 2