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)
Answer ALL questions.
PART A — (10 × 2 = 20 marks)
- 1.
Write short notes on Keywords in C language.
- 2.
What is difference between the statements a = 5 and a == 5 in language C?
- 3.
Write down the syntax for array declaration.
- 4.
What is the purpose and prototype of the function 'strcpy'?
- 5.
Define the term recursion in language C.
- 6.
What is the relation between the operators '&' and ' * ' in C pointers?
- 7.
In language C can we allocate memory dynamically? How?
- 8.
What are the key differences between structure and union?
- 9.
What will be the impact if 'fclose( )' function is avoided in a file handling C program?
- 10.
What are command line arguments?
PART B — (5 × 16 = 80 marks)
- 11.(a)
Draw the structure of a C program and explain each part in detail.
- Or
- (b)
Enumerate the difference between 'else-if ladder' and 'switch - case' statements with appropriate C programs.
- 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)
- Or
- (b)
- (i)Differentiate binary search from linear search.(8)
- (ii)Write a C program to compare two strings without using the function 'strcmp( )'.(8)
- 13.(a)
What is modular Programming? How does the Language C support modular programming? Explain in detail.
- Or
- (b)
What is the necessity of parameter passing in C Programs? What are the two types of doing that? Explain any one in detail.
- 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)
- Or
- (b)
- (i)Write short notes on 'Array of structures'.(8)
- (ii)Write a comparative analysis on various storage classes of language C.(8)
- 15.(a)
What is file? What are facilities available in language C to handle files? Explain.
- Or
- (b)
Explain the various file accessing policies available in language C with appropriate programs.