0% found this document useful (0 votes)
12 views

Programming in C - CS8251 2017 Regulation - Semester Question Paper 2021 Nov Dec

Uploaded by

rk.aid
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Programming in C - CS8251 2017 Regulation - Semester Question Paper 2021 Nov Dec

Uploaded by

rk.aid
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

www.Poriyaan.

in

Reg. No. :

Question Paper Code : 40386

B.E./B.Tech. DEGREE EXAMINATIONS, NOVEMBER/DECEMBER 2021.

Second Semester

Computer Science and Engineering

CS 8251 – PROGRAMMING IN C

(Common to Computer and Communication Engineering/ Information Technology)

(Regulations 2017)

Time : Three hours Maximum : 100 marks


Answer ALL questions.

PART A — (10 × 2 = 20 marks)

1. In which ways does a switch statement differs from an if statements.

2. What is associativity and why is in important?

3. What is the difference between NULL. ‘\0’ and 0?

4. How does the C language handle the values in an array internally?

5. Why addition of two pointers is impossible?

6. Why is the return statement not necessary when function is called by


reference?

7. Illustrate nested structure with an example.

8. What is a self-referential structure?

9. Explain argv and argc.

10. Distinguish between text mode and binary mode operation of a file.

https://play.google.com/store/apps/details?id=com.poriyaan.poriyaan
www.Poriyaan.in

PART B — (5 × 16 = 80 marks)

11. (a) (i) Explain enumeration constants with an example program. (8)
(ii) Write a ‘C’ program to compute student grades using switch case
statement. The input to be program are marks of 5 subjects,
compute the total and average and find respective grade of the
students. (8)
Grades
>90 ‘S’
80-90 A
70-79 B
60-69 C
50-59 D
40-49 E
<40 F

Or

(b) (i) Explain iterative statement in ‘C’ with an example. (8)


(ii) Discuss pre-processor directives with example program. (8)

12. (a) What is string? Explain about declaration and initialization of string in
‘C’. How strings are displayed with different formats? Explain with
examples.

Or

(b) Write a C program to check whether the given matrix is symmetric or


not.

13. (a) Explain different string handling functions available in C with examples.

Or

(b) Write a C program to access the values of an array of elements using


pointer.

14. (a) Explain nested structure and self-referential structure with an example.
Or

(b) Define a structure. Describe how to declare and initialize structure and
its members with an example.

2 40386

https://play.google.com/store/apps/details?id=com.poriyaan.poriyaan
www.Poriyaan.in

15. (a) Explain about the fopen (), fclose(), feof(), fprintf(), fscanf(), fseek() and
rewind() functions.

Or
(b) Create two text files and write a C program to add to contents of one file
at the end of another.

—————————

3 40386

https://play.google.com/store/apps/details?id=com.poriyaan.poriyaan
Programming in C

Unit I (a): Introduction to Programming


Introduction to Computer Software | Classification of Computer Software | Programming Languages |
Generation of Programming Languages
Unit I (b): Introduction to C
Introduction, Background, Characteristics, Uses of C Programming | Structure of a C Program | Writing the First
C Program | Files Used in a C Program | Compiling and Executing C Programs | Using Comments | C Tokens |
Character Set in C | Keywords | Identifiers | Basic Data Types in C | Variables | Constants | Input/Output |
Statements in C | Operators in C | Type Conversion and Typecasting
Unit I (c): Decision Control and Looping Statements
Introduction to Decision Control Statements | Conditional Branching Statements | Iterative Statements | Nested
Loops | The Break and Continue Statements | goto Statement
Unit I (d): Preprocessor Directives
Introduction of Preprocessor Directives | Types of Preprocessor Directives | #define | #include | #undef | #line |
Pragma Directives | Conditional Directives | Defined Operator | #Error Directive | Predefined Macro Names
Unit II (a): Arrays
Introduction to Arrays in C Programming | Declaration of Array in C | Accessing the Elements of an Array in C |
Storing Values in Arrays | Operations on Arrays | Passing Arrays to Functions | Two-Dimensional Arrays |
Operations on Two-Dimensional Arrays | Passing Two-Dimensional Arrays to Functions | Multidimensional
Arrays | Sparse Matrices (Array Representation) | Applications of Arrays
Unit II (b): Strings
Introduction to Strings in C | Suppressing Input | Strings Taxonomy | Operations on Strings | Miscellaneous
String and Character Functions | Arrays of Strings
Unit III (a): Functions
Introduction to Functions | Using Functions | Function Declaration/Function prototype | Function Definition |
Function Call | Return Statement | Passing Parameters to Functions | Scope of Variables | Storage Classes |
Recursive Functions | Types of Recursion | Tower of Hanoi (recursion) | Recursion Versus Iteration
Unit III (b): Pointers
Understanding the Computer's Memory | Introduction to Pointers | Declaring Pointer Variables | Pointer
Expressions and Pointer Arithmetic | Null Pointers | Generic Pointers | Passing Arguments to Function Using
Pointers | Pointers and Arrays | Passing an Array to Functions | Difference Between Array Name and Pointer |
Pointers and Strings | Arrays of Pointers | Pointers and 2D Arrays | Pointers and 3D Arrays | Function Pointers |
Array of Function Pointers | Pointers to Pointers | Memory Allocation in C Programs | Memory Usage | Dynamic
Memory Allocation | Drawbacks of Pointers
Unit IV: Structures and Union
Structure | Nested Structures | Arrays of Structures | Structure and Functions | Self-referential Structures |
Unions | Arrays of Union Variables | Unions Inside Structures | Structures Inside Unions | Enumerated Data Type
| Memory Allocation and Deallocation for a Linked List | Singly Linked Lists
Unit V: File Processing
Introduction to Files | Using Files in C | Read Data From Files | Writing Data From Files | Detecting the End-of-
File | Error Handling During File Operations | Accepting Command Line Arguments | Function for Selecting a
Record Randomly | Remove()| Renaming the File | Creating a Temporary File
All 2nd Semester Subjects
Professional English - II - HS3252 Engineering Graphics - GE3251
Statistics and Numerical Methods - Physics for Electronics Engineering -
MA3251 PH3254
Physics for Electrical Engineering - Physics for Civil Engineering - PH3201
PH3202
Materials Science - PH3251 Basic Electrical and Electronics
Engineering - BE3251
Physics for Information Science - Basic Civil and Mechanical Engineering -
PH3256 BE3255
Basic Electrical and Instrumentation Electric Circuit Analysis (Circuit
Engineering - BE3254 Theory) - EE3251
Programming in C - CS3251 Circuit Analysis - EC3251
Data Structures Design - AD3251
Civil
CSE
Home Mech
e
EEE
ECE

2nd Semester 3rd Semester


1st Semester
Professional English II Discrete Mathematics
Professional English I
Statistics and Numerical
Methods Digital Principles and
Matrices and Calculus
Computer Organization
Engineering Graphics
Engineering Physics
Foundation of Data
Physics for Information
Science Science
Engineering Chemistry

Physics
Basic for Engineering
Electrical and Data Structure
Problem Solving and Science Engineering
Electronics
Python Programming Object Oriented
Programming in C
Programming

4th Semester 5th Semester 6th Semester


Theory of Computation Computer Networks Object Oriented Software
Engineering
Artificial Intelligence Compiler Design
and Machine Learning Embedded Systems IoT
Cryptography and
Database Management Cyber Security Open Elective I
System
Professional Elective III
Algorithms Distributed Computing
Professional Elective IV

Introduction to Operating Professional Elective I Professional Elective V


Systems
Professional Elective II Professional Elective VI
Environmental Sciences
and sustainability Mandatory Course I Mandatory Course II

7th Semester 8th Semester


Human Values and Ethics Project Work/Internship

Elective-Management

Professional Elective II

Professional Elective III

Professional Elective IV

You might also like