Skip to content
SmartFigureEdu

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

Question Paper Code : 60025

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

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.

    Write short notes on Keywords in C language.

  2. 2.

    What is difference between the statements a = 5 and a == 5 in language C?

  3. 3.

    Write down the syntax for array declaration.

  4. 4.

    What is the purpose and prototype of the function 'strcpy'?

  5. 5.

    Define the term recursion in language C.

  6. 6.

    What is the relation between the operators '&' and ' * ' in C pointers?

  7. 7.

    In language C can we allocate memory dynamically? How?

  8. 8.

    What are the key differences between structure and union?

  9. 9.

    What will be the impact if 'fclose( )' function is avoided in a file handling C program?

  10. 10.

    What are command line arguments?

PART B — (5 × 16 = 80 marks)

  1. 11.
    (a)

    Draw the structure of a C program and explain each part in detail.

  2. Or
  3. (b)

    Enumerate the difference between 'else-if ladder' and 'switch - case' statements with appropriate C programs.

  4. 12.
    (a)
    • (i)What is an array? Explain about various types of arrays in detail.(8)
    • (ii)Explain the usage of 'strcat( )' with an C program.(8)
  5. Or
  6. (b)
    • (i)Differentiate binary search from linear search.(8)
    • (ii)Write a C program to compare two strings without using the function 'strcmp( )'.(8)
  7. 13.
    (a)

    What is modular Programming? How does the Language C support modular programming? Explain in detail.

  8. Or
  9. (b)

    What is the necessity of parameter passing in C Programs? What are the two types of doing that? Explain any one in detail.

  10. 14.
    (a)
    • (i)What is the purpose of the concept 'structure' in Language C? Explain in detail with an example program.(8)
    • (ii)Why is singly linked list called as self-referential structure? Explain.(8)
  11. Or
  12. (b)
    • (i)Write short notes on 'Array of structures'.(8)
    • (ii)Write a comparative analysis on various storage classes of language C.(8)
  13. 15.
    (a)

    What is file? What are facilities available in language C to handle files? Explain.

  14. Or
  15. (b)

    Explain the various file accessing policies available in language C with appropriate programs.


Other CS3251 papers