c programming previous year paper

year -2019

                 B.C.A. Second semester

                      Examination, 2019

                            First paper

                      ( C Programming )

Time: 3 Hours                                                      Maximum Marks: 75

Note: Attempt any five questions. All question carry equal marks.

Note: The answer to short answer type questions should not exceed  200 words and the answer to long answer type questions should not exceed 500 words.

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 suitable example.

(B) write a program to compute the sum of diagonal elements of a square matrix.

2. (A) write a program to find the maximum of an array.

        (B) Explain the following briefly :

               (i) Sorting              (ii) Memory representation of array

3. (A) What is the difference between the function malloc() and calloc()?

         (B) What is a pointer in reference to C language? How do you declare pointers? Explain using a suitable example.

4. (A) Explain the term “calling function by reference”. How do you declare pointers? Explain using a suitable example.

     (B) Write a program to read two integer X and Y and swap the contents of the variable x and Y using pointers.

5. (A) what is a structure? Explain the components of a structure.

     (B) what is the difference between a structure variable and a union variable? What are the difference between structure and array?

6. (A) Write a short notes on nested structure.

     (B) What are embedded structure? Give an appropriate  example for embedded  structure.

7. (A) Write C program to implement the following library function in C.

          (i) Strcpy                                  (ii) strcat   

     (B) Write a program inn C that takes a string as input and find out the frequency of each character in the string.

8. (A) what do you understood by built-in-function? How  are they different from user defined function?

     (B) Discuss basic file handling function.

year – 2017

                 B.C.A. Second semester

                      Examination, 2017

                            First paper

                      ( C Programming )

Time: 3 Hours                                                      Maximum Marks: 75

Note: Attempt any five questions. All question carry equal marks.

Note: The answer to short answer type questions should not exceed  200 words and the answer to long answer type questions should not exceed 500 words.

  1. (A) How we can access elements of one dimensional array? Write a program in C language  to illustrate  operation of an array.

(B) Write a program to short the elements  of an array.

    2. (A) What are the characteristics of two-dimensional array? 

          How we declare a two dimensional array in C language ?

          Explain with an example.

    3.(A) What is the role of indirection operator? How we can

                define and declare pointers in C language?

         (B) Write  a program in C language to demonstrate the concept  of pointers in C.

4.(A) What is dynamic memory allocation? Mention the limitation of static memory allocation also. Explain mallo ( ) and calloc( ) function .

    (B) Mention the difference between “ call by value” and “call by reference” by writing a C program.

5.(A) In what way is a string different from a character array?  Explain with example, how we can define, declare and initialize string in C program.

     (B) Write the functionality of strlen( ) and strcpy( ) using C program. Do not use library function.

6. (A) Why we use structure? How we can access member variable ad member function of a structure?

     (B)  Write C program to demonstrate the use of union.

     (C) Mention the difference between a Union and a structure.

7. (A) Why we use “File in ‘C’ Language? Explain the Operating modes of files.

     (B) Explain the following file function with example:

               (i) fopen( )                                             (ii) fclose( )

               (iii) feof( )                                              (iv) fseek( )

8.Write a program in C using a pointers to implement a linked list. Also perform the function of inserting & deleting a mode from it

year – 2016

B.C.A. Second semester

                      Examination, 2016

                            First paper

                      ( C Programming )

Time: 3 Hours                                                      Maximum Marks: 75

Note: Attempt any five questions. All question carry equal marks.

Note: The answer to short answer type questions should not exceed  200 words and the answer to long answer type questions should not exceed 500 words.

  1. (A) What is “Array” data structure? How can we define one dimensional and two dimensional array.

(B) Write a program in C language to compute addition of two matrix.

    2.(A) Explain the row major and column major memeory representation of array. Also mention how we can compute the address of an element in each case.

        (B) Write a C program to show how array can be used as a function argument.

3.(A) What is a pointer? How does it help in dynamic memeory allocation.

     (B) Write short notes on:

              (i)  Array and Pointer

              (ii) Functions and pointers

    4.(A) What is ‘String’? how can we declare and initialize a string variable?

         (B) Explain with example the following string function-

               (i) Strlen( )                     (ii) strcpy( )

               (iii) strcat( )                   (iv) strcmp( )

               (v) strstr

     5.(A) Impliment the following string function without using library function :

               (i) Copy the string      

               (ii) compute the length of the string

               (iii) Reverse the string.

          (B) what is function? What is function definition and function call?

     6.(A) What is structure? How can we access element of a structure?

         (B) What is union? Mention its advantages.

         (C) Mention the difference between structure and union with example.

    7.(A) What is pre-process? What is its advantages? Explain any three pre-process in C.

        (B) Explain the bit wise AND, OR  and NOT operation. Mention the role of shift operators.

     8.(A) How do we declare a file in a C program? Explain the opening modes of file.

        (B)  Explain the following file function with example-

               (i) fopen( )

               (ii)  fclose( )

               (iii) feof( )

               (iv) fgetc( )

               (v) fputc( )