How To Exam?

a knowledge trading engine...


Dr Babasaheb Ambedkar Marathwada University 2010-2nd Sem B.Sc Computer Science .(ester) / Faculty of Science/ / (Advance Programming in C) - Question Paper

Sunday, 20 January 2013 08:05Web

FACULTY OF SCIENCE

B.Sc.(second semester) exam

MARCH/APRIL,2010

COMPUTER SCIENCE

Course code : 304BT

(Advance Programming in C)

(Wednesday,28-4-2010)


Time--1 & 1/2 Hours(90 Minutes) Maximum Marks-30

"Please check whether you have you got the right ques. paper."

N.B.:- (i) All ques. carry equal marks.

(ii) Use only blue or black pen.

1. Attempt any 1 (from a or b) :

(a) (1) Write declaration and initialization of the subsequent :
(Marks 6)

(i) Structure

(ii) Pointer.

(2) discuss static storage class with example. (Marks 4)


(b) What do you mean by preprocessor directives ? discuss file

inclusion and conditional compiler directives with example.
(Marks 10)

2. Attempt any 1 :

(a) discuss the subsequent functions with syntax and 1 example :
(Marks 10)

(1) abs( )

(2) strcat( )

(3) getc( )

(4) rewind( )

(5) initgraph( )

(b) (i) Write a function using pointer to exchange the values

stored in 2 locations in the memory. (Marks 5)

(ii) Write a program in C to demonstrate the use of local
(auto) and global (extern) variables. (Marks 5)

3. Attempt any 1 :

(a) The outline of an incomplete C program is shown below:(Marks 10)

# include

main( )

{

struct demo

{

int a;

float b;

char c;

char name[40];

}S1)

FILE *P1, *P2;

P1 = fopen("bcs.old","r+");

P2 = fopen("bcs.new","w+");

-----------------------------

-----------------------------

-----------------------------

fclose(P1);fclose(P2);

}

You are needed to complete the above program in the light of
the subsequent :

_ learn the value of S1.name from the formatted data file
"bcs.old" and display it on the screen.

_ Enter values for S1.a, S1.b and S1.c from the keyboard, in
response to programmed prompts.

_ Write the values of S1.name,S1.a, S1.b and S1.c to the
formatted data file "bcs.new".

(b) Write a program in C which performs the subsequent tasks :
(Marks 10)

(i) Initialize an integer array of 10 elements in
main( ) function with the subsequent values 6,28,
-8, 0, 39, -5, 0, 31, -15, 25.

(ii) Passes the entire array to a function named

find( ).

(ii) In find( ) count and print the positive, negative
and zero numbers.








( 1 Vote )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Dr Babasaheb Ambedkar Marathwada University 2010-2nd Sem B.Sc Computer Science .(ester) / Faculty of Science/ / (Advance Programming in C) - Question Paper