Sunday, 15 February 2015

DOEACC A3-R3 January, 2006 Question paper

5.
a) Discuss with the help of examples the action of break statement and the continue statement.
b) Does the null statement have any uses besides indication that the body of a loop is empty? Explain.
c) What is the purpose of the \? Escape sequence?
(8+4+3)

(4+2+9)

7.
a) If a pointer is an address, what does the expression like p + j mean?
b) Is i[a] same as a[i]? Justify your answer.
c) Write the following function:

Bool search(int a[], int n, int x);
 
Where a is an array to be searched, n is the number of elements in the array, and x is the search key. “search” should return TRUE if x matches some element of a, FALSE if it doesn’t. Use pointer arithmetic to visit array elements. Include appropriate documentation in your program.
(4+2+9)
8.
a) Develop an algorithm to do the following:
Read an array of 20 elements and then send all negative elements of the array to the end without altering the original sequence.
b) Draw a flow chart and then write a ‘C’ program to generate first 15 members of the following sequence.
1, 3, 4, 7, 11, 18, 29, ...

(5+10)
9.
Develop a flowchart and then write a program for analyzing a line of text stored in a file by examining each of the characters and displaying into which of several different categories vowels, constants, digits, white spaces it falls. Count of the number of vowels, consonants, digits and white space characters. Include an appropriate documentation in your program.
(15)



No comments:

Post a Comment