Sei sulla pagina 1di 2

rtmnupapers.

com

NKT/KS/17/5240

Bachelor of Computer Application (B.C.A.) Semester–I (C.B.S.) Examination


“C” PROGRAMMING
Paper–II
Time : Three Hours] [Maximum Marks : 50

N.B. :— (1) ALL questions are compulsory and carry equal marks.

(2) Draw neat and labelled diagrams wherever necessary.

EITHER

1. (a) Define Algorithm. Write an algorithm to check whether the entered number is prime or not. 5

(b) Differentiate between algorithm and flowchart. Explain sequence programming structure with
example. 5

OR

(c) Define Pseudocode. Write its advantages and limitations. 5

(d) Write an algorithm to find sum of given series :

(1) + (1 + 2) + (1 + 2 + 3) + (1 + 2 + 3 + 4) + ....... upto N terms. 5

EITHER

2. (a) What are the conditional control statements available in C ? Explain. 5

(b) Write a program to check whether the entered number is even or odd. 5

OR

(c) What is Ternary Operator ? Explain with example. 5

(d) Write a program to display the following :

2 3

4 5 6

7 8 9 10 5

NXO—12134 1 (Contd.
EITHER

3. (a) Define Array. Write a program to search an element in the given array of size n using Sequential
Search Method. 5

(b) Write a program using recursion to find factorial of a number. 5

OR

(c) Write a program to find sum of rows and columns in two dimensional array of size 3 × 3. 5

(d) Write a program to concatenate two strings without using strcat( ) function. 5

EITHER

4. (a) Write a program to illustrate the passing of entire structure as a parameter to a function. 5

(b) What is a Pointer ? Explain pointer arithmetic with example. 5

OR

(c) Differentiate between structure and union. Write a program to illustrate use of union. 5

(d) Explain filestream class. 5

5. Attempt ALL :

(a) What is Escape Sequence ? Give its purpose. 2½

(b) Explain modular programming structure. 2½

(c) Give memory representation of two dimensional array. 2½

(d) Write a syntax to declare pointers. Explain * and & pointer operators with example. 2½

NXO—12134 2 NKT/KS/17/5240

rtmnupapers.com

Potrebbero piacerti anche