Previous Year’s Question Papers of C-Programing

BCA second semester  C-Programming Last year’s question paper of Chaudhary Charan Singh University (ccsu)

BCA Question Paper of C-Programming, 2015 (ccsu)

C-Programming (BCA-202)

TIME: THREE HOURS MAXIMUM MARKS : 75

Note: Attempt all the sections as per instructions

Section-A

(Very Short Answer Questions)

Note: Attempt all the five questions. Each question carries 3 marks. very short answer is required not exceeding 75 words.

  1. What is array in C? How can you reference it?
  2. What is pointer? What operator can be used on pointer?
  3. How can you declare and initialise a string?
  4. Distinguish between structure and union.
  5. Distinguish between # ifdef and #if directive.

Section-B

(Short Answer Question)

Note: Attempt any two questions out of the following three questions, Each question carries 7.5 marks. Short answer is required not exceeding 200 words.

  1. What are two-dimensional array? How can you initialise them? How can you define a pointer to create a two-dimensional array?
  2. Write a program in C to concatenate two strings without using stract[].
  3. What is ‘union’ in C? Explain its usage.

Section-C

( Detailed Answer Question )

Note: Attempt any three questions out of the following five Question. Each question carries 15 marks. Answer is required in detail.

    • How can you give command line arguments? Explain with an example.
    • what are different modes in that you can open a file? Explain each mode in brief.
    • What is macro? How is it different from a C variable name? What precaution one should take when using macros with arguments?
    • Explain the use of ‘&’ and ‘|’ bitwise operators.
    • Define structure timing containing three members hour, minute and second. Develop a program that assigns values to the individual member and display the time the following from 19: 35: 29.
    • What are three-dimensional arrays? How can you in a initialise them at the time of execution.
    • Write a program that can read a text and can count occurrences of a given word.
    • Write a program to multiply two matrices of dimensional m * n and n * I effectively.
    • Write a program to sort the elements of a given array in decreasing order.
    • How can you read and write text file? Explain with example.

BCA Question Paper of C-Programming, 2016 (ccsu)

C-Programming (BCA-202)

TIME: THREE HOURS MAXIMUM MARKS : 75

Note: Attempt all the sections as per instructions

Section-A

(Very Short Answer Questions)

Note: Attempt all the five questions. Each question carries 3 marks. very short answer is required not exceeding 75 words.

  1. What are two-dimensional arrays? How can ye initialise them?
  2. How does structure differ from an array?
  3. Distinguish between (*m)[5] and *m[5]?
  4. How can you declare and initialise string?
  5. Explain the meaning of the following:
    • Tags
    • Sizeof

Section-B

(Short Answer Question)

Note: Attempt any two questions out of the following three questions, Each question carries 7.5 marks. Short answer is required not exceeding 200 words

  1. What is a dynamic array? How is it created? Give typical example of use of a dynamic array.
  2. Write a program to illustrate the comparison of structure variables.
  3. What is a pointer? How can it be initialised? Write a program using pointer to read in an array of integers and print its elements in reverse order.

Section-C

( Detailed Answer Question )

Note: Attempt any three questions out of the following five Question. Each question carries 15 marks. Answer is required in detail.

    • Give the main advantages of storing data as a file. Describe various ways in which data files can be categorised in ‘C’ Illustrate by using examples.
    • Enumerate the difference between functions and parameterised macros. Why do we recommend the use of parentheses for formal arguments used in a macro definition?
    • Describe the two bitwise shift operators. What requirement must the operands satisfy? What is the purpose of each operand?
    • Describe two different approaches to updating a data file. Which approach is better and why? For what kinds of applications are unformatted data files well suited?
    • Write a program to illustrate the use of structure pointers.
    • What are jumping statements? Explain the difference between break and continue statement.
    • Describe the limitation of using getchar and scanf functions for reading strings. Write a program which will read a text and count all occurrences of a particular word.
    • what is prototyping? Why is it necessary? Distinguish between the following:
      • Scope and visibility of variables.
      • Actual and formal arguments.
    1. What is a ‘Slack byte’? How does it affect the implementation of structures? Describe three different approaches that can be used to pass structures as function arguments.
    2. Write a function using pointers to add two matrices and to return the resultant matrix to the calling function.

BCA Question Paper of C-Programming, 2017 (ccsu)

C-Programming (BCA-202)

TIME: THREE HOURS MAXIMUM MARKS : 75

Note: Attempt all the sections as per instructions

Section-A

(Very Short Answer Questions)

Note: Attempt all the five questions. Each question carries 3 marks. very short answer is required not exceeding 75 words.

  1. Explain the difference between array and structure.
  2. Differentiate between *(arr+i) and (arr+i).
  3. Write a short note on nested structures.
  4. Explain command line arguments in C using example.
  5. How pointers are implemented with function with example.

Section-B

(Short Answer Question)

Note: Attempt any two questions out of the following three questions, Each question carries 7.5 marks. Short answer is required not exceeding 200 words.

6. Write the output:

#include<stdio.h>

main()

{

int arr [ ] = {1, 2, 3, 4, 5};

int i =1, j =2;

printf(“%d”, *(arr+1+i));

printf(“%d”, *(arr+*(arr+i)));

printf(“%d”, *(arr+j));

printf(“%d”, *(arr+i) +* (arr+j)));

}

  1. Write a program to interchange second element with last element of an array.
  2. Write short note on:
    • fopen()
    • fclose
    • fgetc()
    • fprintf()

Section-C

( Detailed Answer Question )

Note: Attempt any three questions out of the following five Question. Each question carries 15 marks. Answer is required in detail.

    • What is string? Write a program to find concatenate of two strings using pointers without Library function.
    • Write a program using pointers to search a value from an array.
    1. Write a short note on conditional directives.
    2. In a class there are 5 students. Each student is supposed to appear in 3 tests. Write a program using 2-D array to print.
      • The marks obtained by each student in different subjects.
      • Total marks and average obtained by each student.
    • Explain different types of files in file handling and what are different modes to open a file?
    • Difference between structure and union. Explain how members of a union are accessed using a program code.
    • What is file? Write C program to copy the contents of one file into another file.
    • Explain different bitwise shit operators use in C-programming.
    • What is pointer? Explain pointer to pointer with example. Can we subtract tv pointer variables?
    • Write a program to explain the use of structure with function.

Leave a Reply