Download Model question papers & previous years question papers
Posted Date: 07 Jul 2009 Posted By:: rajesh kale Member Level: Silver Points: 5 (₹ 1)
|
2007 Rajiv Gandhi Proudyogiki Vishwavidyalaya(Technical University) Computer M.C.A M.C.A.(Second Semester) EXAMINATION, June,2007 Question paper
MCA-103 M.C.A.(Second Semester) EXAMINATION, June,2007 PROGRAMMING AND PROBLEM SOLVING IN C (MCA-103) Time : Three Hours Maximum Marks : 100 Minimum Pass Marks : 40
Note : Attempt any one question for each Unit. In total five questions are to attempted. The programs must be well documented and indented.
Unit -I 1.(a) Discuss the following types of errors that may be encountered in a program : (i) Syntax error (ii) Linker error (iii) Run time error (iv) Logical error Briefly tell the way to handle these errors. (b) Discuss various phases of program execution : (i) Preprocessing (ii) Compilation (iii)Linking and loading (iv) Execution
2.(a) Discuss in detail about top-down and bottom-up design techniques. (b) Describe the following phases of software development process : (i) Analysis (ii) Coding (iii)Testing (iv) Modification and Maintenance
Unit -II 3.(a) Discuss the swith....case structure with a brief example. What is 'default' in this context. (b) Discuss the difference between while and do....while loops. (c) Design a program to read n different numbers form keyboard and display the largest of all the odd numbers. 4.(a) Give a detailed study of operators available in C language clearly specifiying their precedence and associativity. (b) Design aprogram that : (i) reads an array on integers (ii) reverses it in its place (iii) displays the reversed array The program must be well documented and indented.
Unit - III 5.(a) What is the visibility and life time of a variable ? Discuss the visibility and life time of local, global and static variables. (b) What is recursion ? Give a comparative study of recursion and iteration. (c) Design a function that returns the rounded integer of a float variable. The prototype may be : int round(float x); No standard library function is to be used. (d) Design a recursive function of finding factorial of a number. The prototype of the function may be : long factorial(int n); 6.(a) Why is it necessary to pass the maximum column size of a two dimensional array to the called function ? (b) Design a recursive function for finding power xn. The prototype of the function may be : 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) Discuss about the following functions : (i) malloc() (ii) calloc() (iii) realloc() (iv) free() (b) What do the following 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 another ? 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 between a structure and a union ? Take a brief example. (b) Discuss 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 another. 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 read from keyboard into the array locations by using the pointer. Design loop to display the array contents by using pointer.
Unit - V 9.(a) What are different modes of opening a file ? (b) Discuss the possible drawback of the following macro, used to find 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 ? Discuss the seek() function in details in this context. (b) Describe in brief about the following preprocessor directives : (i) #ifdef (ii) #ifndef (iii)## (iv) # paragma (v) #include (c) Design a program to remove comments from another 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 between /* and */.
Return to question paper search
|
|
Submit Previous Years University Question Papers and
make money from adsense revenue sharing program
Are you preparing for a university examination? Download model question papers
and practise before you write the exam.