MGKVP BCA 2ND SEM C PROGRAMMING QUESTION PAPER

Here, you will find MGKVP BCA C programming question paper of previous years

The important notes which is directed by the Mahatma Gandhi Kashi Vidyapeeth university while writing in your answer booklet are as follows :

Attempt any five questions.All questions carry equal marks.The answers to short questions should not exceed 200 words and the answers to long questions should not exceed 500 words.The time of examination is three(3) hours and maximum marks is 75.

BCA 2nd Sem C Programming Question Paper 2020:

MGKVP BCA C PROGRAMMING 2020 question paper cancelled due to COVID 19 pandemic


BCA C Programming Question Paper 2019:

Q 1- (a) How values can be stored in a 1-Dimensional array . Give example of various methods. (6 marks)
(b) Consider a 20 X 5 tow – dimensional array Marks which has base address = 1000 and the word size = 2.Now compute the address of the element Marks [18,4] assuming that the elements are stored in row major order. (2 marks)
(c) Write a program in C language to delete a number from a given location in an array. (7 marks)

Q 2- (a) What happens when an array is initialized with:
(i)Fewer initialisers as compared to its size?
(ii)More initialisers as compared to its size? (2 marks)
(b) What does array name signify? How is an array represented in memory? (2+4=6 marks)
(c) Write a program in C language to count the total number of non zero elements in a two dimensional array. (7 marks)

Q 3- (a) Find output of the following program ---
      main()
      {

         int arr[]={1,2,3,4,5};
         int * ptr,i;
         ptr=&arr[2]; 
         *ptr=-1; 
         *(ptr+1)=0;
         *(ptr-1)=1; 
         printf(“\nArray is :”); 
         for(i=0;i<4;i++)
             printf(“%d”,*(arr+i));

       } (4 marks)
(b) Compare pointer and array name. (4 marks)
(c) Differentiate between a variable address and a variable value. How can we access a variable’s address and its value using pointer? (7 marks)

Q 4- (a) Explain with an example how structures are initialized ? (4 marks)
(b) What is the use of self referential structure? Explain by using suitable example. (4 marks)
(c) Explain utility of typedef keyword in structures. Also explain in which applications unions can be useful. (7 marks)

Q 5- (a) Differentiate between a character array and a string by using suitable example. (6 marks)
(b) Differentiate between gets() and scanf()? (2 marks)
(c) Write syntax and role of following functions:
       (i)strcat()
       (ii)strcmp()
       (iii)strlen()
       (iv)strcpy()
       (v)strstr()
       (vi)strncpy()
       (vii)strchr() (7 marks)

Q 6- (a) Why should we incorporate preprocessor directives in our programs? Give at least one example to support your answer. (4 marks)
(b) What happens when the argument passed to the macro has multiple white space characters? (4 marks)
(c) Write in short about following:

       (i) # undef
       (ii) # line
       (iii) # pragma
       (iv) # define
       (v) # if
       (vi) # endif
       (vii) # error ( 7 marks)

Q 7- (a) What is a file? Differentiate between a text file and a binary file. (2+2=4 marks)
(b) Explain the different modes in which a file can be opened in a C program. (4 marks)
(c) Explain the following functions:

         (i) fopen()
         (ii) fclose()
         (iii) fseek()
         (iv) fewind()
         (v) feof()
         (vi) fgetc()
         (vii) fputc() (7 marks)

Q 8- (a) Differentiate between call by value and call by reference parameter passing in a function . Explain by giving suitable example. (8 marks)
(b) Differentiate between pointers to constants and constant to pointers. (3 marks)
(c) Find the output of the following codes:

          main()
          {

               int A[]={1,2,3,4,5}; 
               int * p,i; 
               p=A+4;     
               for(i=4;i>=0;i--)
                     printf(“\n%d”,*(p-i));

           } (4 marks)
xxxxx

BCA 2nd Sem C Programming Question Paper 2018:

Q 1- (a) What is an array? What are the merits and demerits of array in C? Differentiate between one dimensional and two dimensional arrays with examples. (8 marks)
(b) Write a program to compute the sum of diagonal elements of a square matrix. (7 marks)

Q 2- (a) Write a program to find the maximum of an array. (7 marks)
(b) Explain the following briefly:
  1. Sorting
  2. Memory representation of array. (8 marks)
Q 3- (a) What is the difference between the functions malloc() and calloc()? (7 marks)
(b) What is a pointer in reference to C language? How do you declare pointers? Explain using a suitable example. (8 marks)

Q 4- (a) Explain the term "calling function by reference" How it is done in C language? (7 marks)
(b) Write a program to read two integers X and Y and swap the contents of the two variables X and Y using pointers. (8 marks)

Q 5- (a) What is a structure? Explain the components of a structure. (7 marks)
(b) What is the difference between a structure and variable and a union variable? What are the difference between structure and array? (8 marks)

Q 6- (a) Write a short note on nested structures. (7 marks)
(b) What are embedded structure? Give an appropriate example for embedded structure. (8 marks)

Q 7- (a) Write C program to implement the following library function in?
  1. strcpy
  2. strcat. (10 marks)
(b) Write a program in C that takes a string as input and find out the frequency of each character in the string. (5 marks)

Q 8- (a)What do you understand by built in functions? How are they different from user defined functions? (5 marks)
(b) Discuss basic file handling functions. (10 marks)

xxxxx

BCA C Programming Question Paper 2017:

Q 1- (a) How we can access elements of one dimensional array? Write a program in C language to illustrate operations on an Array. (8 marks)
(b) Write a program to sort the elements of an array. (7 marks)

Q 2- (a) What are the characteristics of two-dimensional array? How we declare a two dimensional array in C language? Explain with an example. (7 marks)
(b) Describe the Row major and column major memory representation of 2-dimensional array with a suitable example. (8 marks)

Q 3- (a) What is the role of indirection operator? How we can define and declare pointers in C language? (5 marks)
(b) Write a program in C language to demonstrate the concept of pointers in C. (10 marks)

Q 4- (a) What is dynamic memory allocation? Mention the limitation of static memory allocation also. Explain the malloc() and calloc() function. (8 marks)
(b) Mention the difference between 'call by value' and 'call by reference' by writing a C program. (7 marks)

Q 5- (a) In what way is a string different from a character array? Explain with example, how we can define,declare and initialize strings in C program. (5 marks)
(b) Write the functionality of strlen() and strcpy() using C program. Do not use library functions. (10 marks)

Q 6- (a) Why we use structures? How we can access member variable and member fuction of a structure? (5 marks)
(b) Write a C program to demonstrate the use of a union. (5 marks)
(c) Mention the differences between a Union and a structure. (5 marks)

Q 7- (a) Why we use File in C language? Explain the operating modes of files. (5 marks)
(b) Explain the following file functions with example: 
  1. fopen()
  2. fclose()
  3. feof()
  4. fseek() (10 marks)
Q 8- Write a program in C using pointers to implement a linked list. Also perform the functions of inserting and deleting a mode from it. (15 marks)

xxxxx

BCA 2nd Sem C Programming Question Paper 2016:


Comments

Popular posts from this blog

Mgkvp bca 6th semester e commerce previous years question papers and notes

MGKVP BCA COMPUTER NETWORK SECURITY QUESTION PAPER WITH STUDY NOTES

MGKVP BCA KNOWLEDGE MANAGEMENT QUESTION PAPERS WITH STUDY NOTES