How To Exam?

a knowledge trading engine...


Gujarat University 2008-1st Year B.C.A Computer Application Programming in C Language - Question Paper

Sunday, 12 May 2013 08:35Web



Scat No.    ST

FBCA-02

April-2008 Programming in C Language B.C.A. -102


Time: 3 iloursj    [Max. Marks: 70

Instructions : (I) Figures to the right indicate full marks of the question.

(2) Begin new question from new page.

1.    Attempt the following (Any 7):    14

(i)    Give two differences between compiler and interpreter.    

(ii)    Draw and explain any four symbols used in flowchart.

(iii)    Give two features which makes 'C' a very popular language.

(iv)    What is an assembler ?

(v)    Explain procedural language and problem-oriented language.

. (vi) Explain enum data type with an example.

(vii)    Find X, if X-((-25< 13) ? (7%10): (10%7))

(viii)    State two features of a higher-level language. Give an example.

(ix)    Classify the basic constants available in C\

(x)    Give the limitations of lower level languages.

2.    (A) Write algorithm for the following (Any 2):    6

(i) To generate first 10 numbers of Fibonacci scries, which is given as

0,1, 1,2, 3,5,8.-

(it) To read a number and find the sum of digits.

(iii)    To read a year and find out whether it is leap year or not.

(iv)    To read three numbers and find their average.

(B) Draw flowchart for the following (Any 2):    8

(i)    To read n from the user and compute the sum and average of first n -numbers.

(ii)    To display the sum of the series for n terms, where n is read from the user and the series is given as

sum -1+8 +27 + 64 +....

(iii)    To read a dccimal number and convert it to binary number.

(iv)    To read principal amount (p), rate of interest (r) and number of years (n) from the user and compute simple interest. The formula for simple interest is given as (p*r*nyi00.

FBCA-02    I    P.T.O.


3. (A) Differentiate between the following (Any 2):

(i)    Array and Structure

(ii)    Entry controlled loop and Exit controlled loop

(iii)    Break and Continue

(iv)    Pass by value and Pass by reference

(B) Attempt the following (Any 2):

(i)    Give the output of the following *C* code :

ini x-10, y-20, sum=0, val=0; whilc(sum<20)

{

y-t-5;

if*y%2=0)

sum-sum+x;

else

t vaHval-IO;

)

printf(%d %d %d %d\x,y,sum,val);

(ii)    Give ihe output of the following code :

int comp(int. ini); void mainQ {

int ir,20,>r:30,a,b; a-<omp(u,v); b-comp(a.comp(v,u)); pnntf(%d %d\n\a.b);

)

int comp(int x, int y)

{

iff(x<y)

rctum(x+y);

else

retum(x-y);

}

FBCA-02    2


(iii)    Find the errors in the following program :

rrinc)ude<stdio.h>

Winc)udc<lc.h>

void mainO    c

{

char oh;

printf(enter a character'*); scanf(%d",ch); if (chV fch-'z)

Printf(Last or first alphabet);

'    if isdigit(ch)

Then

printf(MDigh");

I

(iv)    Find the errors in the following program :

,tf include<sldio.h>

void MAINO    . ,

i

int al.bl;

print(ewer 2 numbers"); v scanf(%f %s,&al.&bl); primR%2d\n %2d.al.bl);

}

4. (A) Discuss in detail (Any 3):    9

(i)    Explain the following string (unctions with syntax and example. strcal(). strempO and xtrcpy().

(ii)    -Explain singly linked list, doubly linked list and circular linked list.

~ (iii) Explain the following file functions with syntax and example. rewindO,fclose() and fopenO-

(iv) What is macro substitution ? Explain different typesofjmacro substitution.

% (v) List all the operators available in C\

fir.- " i'

(vi) Explain nested if and eJse-ifladder.



FBCA-02    3    P.T.O.


(B) Answer in short {Any 5):    5

(1)    Give application area of a linked list.

(2)    What is a counter controlled loop ?

(3)    List the storage classes available in C\

(4)    What is prototyping ?

(5)    What is scale factor ?

(6)    What is implicit conversion ?

(7)    What is the output of sizeof() function ?

5. (A) Write a C program for the following (Any 3):    12

(i)    Read a number and find out whether it is palindrome or not.    /

(ii)    Read a string and find out the following without using any string functions.

(a)    Length of the string.

(b)    Number of vowels in the string. (a,c,i,o,u arc called vowels)

(iii)    Read 10 numbers in an array and find maximum from those numbers.

(iv)    Create a structure called cmp_data which would have the following members:

'    emp_name, which stores name of the employee,

cmp_basic, which stores the basic salary of the employee, emp_da, which stores the amount of dearness allowance paid to the employee.

cmpjotal, which is the sum of employee's basic salary and dearness allowance.

Create an array of 10 such records and read the data for emp_namc and emp_basic from the keyboard. Compute emp_da, which is 90% of basic salary and emp_total. Display all records.

(v)    Generate the following pattern for n number of rows, where n is read from the user.

I

22 3 3 3 4444

(vi) Compute the factorial of a number using recursion.

(B) Give one word for the following :    2

(i)    A data structure, which allows storing multiple items of the same data type.

(ii)    A derived data type, which allows storing the memory addresses.



FBCA-02    4







Attachment:

( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Gujarat University 2008-1st Year B.C.A Computer Application Programming in C Language - Question Paper