LOYOLA COLLEGE (AUTONOMOUS), CHENNAI – 600 034

advertisement
LOYOLA COLLEGE (AUTONOMOUS), CHENNAI – 600 034
B.C.A. DEGREE EXAMINATION – COMPUTER APPLICATIONS
FIRST SEMESTER – April 2009
CA 1501 - PROGRAMMING IN C AND DATA STRUCTURES
Date & Time: 22/04/2009 / 1:00 - 4:00
Dept. No.
RI 01
Max. : 100 Marks
PART – A
ANSWER ALL THE QUESTIONS
10 x 2 = 20
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
Define constants.
What is the function of fflush ?
Write any 2 rules for switch statement
Write down the conditional operation in C language with syntax.
Define array
What is strcmp() function
Write the general format of structure ?
What is the purpose of self referential structurte?
How is a pointer initialized ?
What is malloc function ?
PART – B
ANSWER ALL THE QUESTIONS
5 x 8 = 40
11.
a) What are different data types in C language?
or
b) Write scanf () and Print f () with its syntax and give example
12.
a) Write a C program for Fibonacci series using Recursion .
or
b) Explain for loop and while loop with example.
13.
a) Write a C program to compute the sum of the elements in an array
or
b) Explain i) islower ii) isdigit iii) strcpy iv) strlen
14.
a) Explain i) Opening a file ii) closing a file
or
b) what is self – referential structure ? Explain.
15.
a) Explain the operations of stack and queue.
or
b) Write a C program to create a list to add ten names and search a given name.
PART – C
ANSWER ANY TWO QUESTIONS
16.
2 x 20 = 40
a) Explain any two functions from math class and string class with example.
b) Explain Switch statement with example.
17.
a) Write a C program using arrays to sort an element in an ascending order.
b) Write a C program to concatenate two strings.
18.
a) Write a C program for Reading and Printing a sequential file.
b) Explain the advantages of using linked lists over arrays ? Explain in detail with a
sample program for both.
***************
Download