Skip to content
SmartFigureEdu

CS 3251 Programming in C question paper, April/May 2023

Question Paper Code : 30115

B.E./B.Tech. DEGREE EXAMINATIONS, APRIL/MAY 2023.

Second Semester

Computer Science and Engineering

CS 3251 — PROGRAMMING IN C

(Common to : Computer Science and Engineering (Data Science)/Electrical and Computer Engineering/Computer Science and Engineering (Artificial Intelligence and Machine Learning)/Computer Science and Engineering (Cyber Security)/Computer and Communication Engineering/Information Technology)

(Regulations 2021)

Time : Three hoursMaximum : 100 marks

Answer ALL questions.

PART A — (10 × 2 = 20 marks)

  1. 1.

    Draw the structure of C program.

  2. 2.

    What is the purpose of format specifier in I/O statements? Give an example.

  3. 3.

    Write down the syntax and give an example for array initialization.

  4. 4.

    How to identify the length of a string?

  5. 5.

    What is the function prototype? Give an example.

  6. 6.

    What are the difference between user defined functions and built-in functions?

  7. 7.

    What do you mean by self-referential structure?

  8. 8.

    What is unique about the storage class 'register'?

  9. 9.

    Describe the prototype of the function fopen().

  10. 10.

    List the various modes of accessing a file through C.

PART B — (5 × 16 = 80 marks)

  1. 11.
    (a)

    Explain the various data types being supported by C language.

  2. Or
  3. (b)

    Explain about the various looping statements available in 'C' with appropriate sample programs.

  4. 12.
    (a)
    • (i)What is an array? Explain about one dimensional array with a sample program.(8)
    • (ii)Write about the significance of header file, 'string.h' and write short notes on any three string functions.(8)
  5. Or
  6. (b)
    • (i)Write and explain the procedure for selection sort.(8)
    • (ii)Write a C program to demonstrate matrix addition.(8)
  7. 13.
    (a)

    Write short notes on the following:

    • (i)function prototype and function call(8)
    • (ii)function definition and return value(8)
  8. Or
  9. (b)

    Enumerate the difference between call by value and call by reference with suitable examples.

  10. 14.
    (a)
    • (i)Explain the need for nested structures with appropriate example program.(8)
    • (ii)Can a linked list grow dynamically? Justify your answer with example C program.(8)
  11. Or
  12. (b)
    • (i)With suitable diagram, explain the concept of singly linked list.(8)
    • (ii)Enumerate the difference between structure and union with example.(8)
  13. 15.
    (a)

    How does random accessing of files are done in C language? Explain in detail.

  14. Or
  15. (b)

    What is the purpose of the variables argc and argv of command line arguments in C language? Explain with a sample program.


Other CS3251 papers