OCS752 Introduction to C Programming Syllabus:

OCS752 Introduction to C Programming Syllabus – Anna University Regulation 2017

OBJECTIVES:

  • To develop C Programs using basic programming constructs
  • To develop C programs using arrays and strings
  • To develop applications in C using functions and structures

UNIT I INTRODUCTION

Structure of C program – Basics: Data Types – Constants –Variables – Keywords – Operators: Precedence and Associativity – Expressions – Input/Output statements, Assignment statements – Decision-making statements – Switch statement – Looping statements – Pre-processor directives – Compilation process – Exercise Programs: Check whether the required amount can be withdrawn based on the available amount – Menu-driven program to find the area of different shapes – Find the sum of even numbers.

UNIT II ARRAYS

Introduction to Arrays – One dimensional arrays: Declaration – Initialization – Accessing elements – Operations: Traversal, Insertion, Deletion, Searching – Two dimensional arrays: Declaration – Initialization – Accessing elements – Operations: Read – Print – Sum – Transpose – Exercise Programs: Print the number of positive and negative values present in the array – Sort the numbers using bubble sort – Find whether the given is matrix is diagonal or not.

UNIT III STRINGS

Introduction to Strings – Reading and writing a string – String operations (without using built-in string functions): Length – Compare – Concatenate – Copy – Reverse – Substring – Insertion – Indexing – Deletion – Replacement – Array of strings – Introduction to Pointers – Pointer operators – Pointer arithmetic – Exercise programs: To find the frequency of a character in a string – To find the number of vowels, consonants and white spaces in a given text – Sorting the names.

UNIT IV FUNCTIONS

Introduction to Functions – Types: User-defined and built-in functions – Function prototype – Function definition – Function call – Parameter passing: Pass by value – Pass by reference – Built-in functions (string functions) – Recursive functions – Exercise programs: Calculate the total amount of power consumed by ‘n’ devices (passing an array to a function) – Menu-driven program to count the numbers which are divisible by 3, 5 and by both (passing an array to a function) – Replace the punctuations from a given sentence by the space character (passing an array to a function)

UNIT V STRUCTURES

Introduction to structures – Declaration – Initialization – Accessing the members – Nested Structures – Array of Structures – Structures and functions – Passing an entire structure – Exercise programs: Compute the age of a person using structure and functions (passing a structure to a function) – Compute the number of days an employee came late to the office by considering his arrival time for 30 days (Use array of structures and functions)

TEXT BOOK:

1. Reema Thareja, “Programming in C”, Oxford University Press, Second Edition, 2016

REFERENCES:

1. Kernighan, B.W and Ritchie,D.M, “The C Programming language”, Second Edition, Pearson Education, 2006
2. Paul Deitel and Harvey Deitel, “C How to Program”, Seventh edition, Pearson Publication
3. Juneja, B. L and Anita Seth, “Programming in C”, CENGAGE Learning India pvt. Ltd., 2011
4. Pradip Dey, Manas Ghosh, “Fundamentals of Computing and Programming in C”, First Edition, Oxford University Press, 2009