How To Exam?

a knowledge trading engine...


Rajiv Gandhi Proudyogiki Vishwavidyalaya 2007-2nd Sem M.C.A Computer Aplications .(ester) , e, - Question Paper

Monday, 28 January 2013 10:55Web
double power(float x, int n);
(c) Design a function that returns the count of 1's in the binary equivalent of the number
supplied as parameter. The prototype of the function may be :
int count(int x);
(d) Design a function that returns how many times it has been called so far. The prototype of
the function may be :
int sample(void);

Unit - IV
7.(a) explain about the subsequent functions :
(i) malloc()
(ii) calloc()
(iii) realloc()
(iv) free()
(b) What do the subsequent statements indicate, explain:
(i) int(*p) [10];
(ii) int *f();
(iii) int (*pf)();
(iv) int *p[10];
(v) int (*pf) (int *);
(c) What is a string in C ? How the end of string can be identified ? Design a function to
concat a string into a different ? Th prototype of the function is :
char * my_strcat(char * target, char * source);
Do not use any standard library function inside the body of the function.
(d) Design a function to create a dynamic array of integers of size n. The variable n is to
be passed as parameter from the function. The function returns the pointer of
dynamically allocated space :
int * create_array(int n);
8.(a) What is the difference ranging from a structure and a union ? Take a brief example.
(b) explain the concept of call by value and call by reference parameter passing. Design a
function to swap to variables. The prototype may be :
void swap(int * x,int *y);
(c) What is a string in C ? How the end of stirng can be identified ? Design a function to copy
a string into a different. The prototype of the function is :
char * my_strcopy(char * target, char * source);
Do not use any standard library function inside the body of the function.
(d) Declare an array of integer of size 10. Declare an integer pointer. Assign the address of
the array into the pointer. Design loop to learn from keyboard into the array locations by
using the pointer. Design loop to display the array contents by using pointer.

Unit - V
9.(a) elaborate various modes of opening a file ?
(b) explain the possible drawback of the subsequent macro, used to obtain square of a number :
#define SQR(X) X*X
Suggest the solution also.
(c) Design a program to copy a file. The source and target file names are to be supplied from the
command line. The program name is xcopy.c then the command is :
c:> xcopy source.dat destination.dat
10.(a) How can random accessing be supported in files ? explain the seek() function in details in
this situation.
(b) define in brief about the subsequent preprocessor directives :
(i) #ifdef
(ii) #ifndef
(iii)##
(iv) # paragma
(v) #include
(c) Design a program to remove comments from a different C program. The C program file from which
comments are to be removed is to be supplied from the command line. The file generated
without comment is also to be supplied from the command life.
If the program name is remove.c then
C:> remove withComment.c withoutComment.C
Where, withComment.c is the file with comments;
withoutComment.C is the file after removing the comments.
The comments in a C rpgram are ranging from /* and */.




( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Rajiv Gandhi Proudyogiki Vishwavidyalaya 2007-2nd Sem M.C.A Computer Aplications .(ester) , e, - Question Paper