# Ch. Charan Singh University 2008 B.C.A Computer Application Data Structure and Programming with "C" - Question Paper

Saturday, 19 January 2013 08:10Web

(20

**6**Roll. No. ………………..

**8)**BCA (II Sem.)

3100

B.C.A Examination, 2008

Data Structure and Programming with “C”

(BCA-202)

**Time:**3 Hours

**Maximum Marks**: 75

Note: Attempt any 5 ques.. All ques. carry equal marks. Attempt any 2 ques. from part A and part B are compulsory.

part “A”

1

**(**define the 4 basic data kinds. How could we extend the range of values they represent?

**a)**(b)In what ways does a switch statement differ from an if statement?

(c)The factorial of an integer m is the product of consecutive integers from l to m. That is,

Factorial m=m! =m*(m-l)x…………….l

Write a program that computes and prints a table of factorial.

**2.**

**(**Write a program which will learn a tent and count all occurrences of a particular word.

**a)**(b)Write a program to print out all Armstrong numbers ranging from one and 500. If sum of cubes of every digit of the number is equal to the number itself, then the number is called an Armstrong number. For example,

153= (1*1*

**1)**+ (5*5*

**5)**+ (3*3*3)

**3.**

**(**Write a program to generate all combinations of 1, two and three using for loop.

**a)**(b)What is meant by the subsequent terms?

(i)Nested Structure

**(**Array of structure.

**i****i)****4.**

**(**Write a program using pointers to learn in an array of integers and print its element in reverse order.

**a)****(**What is macro and how is it various from a ‘C’ variable name?

**b)****(**A positive integer is entered through the keyboard; write a program to find the prime factors of the number. replace the function suitably to find the prime factors recursively.

**c)**part “B”

**5.**

**(**Why is a stock needed to implement a recursive routines?

**a)****(**Write a insert and delete functions, in C language, simulating insertion and deletion operation of a queue which is implemented as an array of characters. Make necessary assumptions.

**b)****6.**

**(**Write a ‘C’ program to create a doubly linked list in ascending sorted order of the info . info field is of kind integer.

**a)**(b)What is Sparse Matrix? discuss by giving an example.

**7.**(a)What is binary search tree? Write a general non-recursive C program for a preorder traversal of a binary tree.

(b)What is Threaded Tree? How data is inserted in Threaded Tree? How data is inserted in Threaded Tree.

Earning: Approval pending. |