Skip to content

Latest commit

 

History

History
116 lines (99 loc) · 3.76 KB

OE3-Problem-Solving-and-Programming-in-C.org

File metadata and controls

116 lines (99 loc) · 3.76 KB

<<<OE3>>> PROBLEM SOLVING AND PROGRAMMING IN C

{{{credits}}}

LTPC
2023

COURSE OBJECTIVES

  • To use basic programming concepts of C
  • To develop programs using loops, functions, arrays, pointers, strings, structures and files.

{{{unit}}}

UNIT IBASICS6

Algorithm – Structure of a C program – Data Types: built-in, user-defined – Variables and constants – Input and output statements – Operators, expressions, and assignment statements – Control statements.

{{{unit}}}

UNIT IIFUNCTIONS6

Function prototype – Function definition and call – Passing parameters – Built-in functions – Recursion.

{{{unit}}}

UNIT IIIARRAYS AND POINTERS6

Arrays: Declaration, initialization – One-dimensional arrays – Multi-dimensional arrays; Pointers: Pointer operators – Pointer operations – Array of pointers – Passing arrays to functions.

{{{unit}}}

UNIT IVSTRINGS, STRUCTURES AND UNIONS6

Strings: Constants and variables, reading and writing strings, string operations, string library; Command line arguments; Structures: Structures and functions – Array of structures – Pointer to a structure – unions; Dynamic memory allocation.

{{{unit}}}

UNIT VFILES6

Files: opening and closing a data file – Creating a data file – Processing a data file – Unformatted data files – Formatted input and output – Line input and output – File error handling.

\hfill Theory Periods: 30

SUGGESTIVE EXPERIMENTS

  • Program using I/O statements, conditional constructs (if, switch, ternary) and looping constructs (for, while, do-while)
  • Program functions with different parameter passing techniques: Call by value, call by reference (e.g. changing the elements of an array)
  • Program one dimensional arrays (e.g. Insertion sort)
  • Program using strings and their operations (e.g. concatenation of strings, extracting a substring, checking for palindrome)
  • Program to demonstrate simple structure manipulations (e.g. generating a transcript with CGPA and class obtained)
  • Programs to demonstrate file operations (e.g. count the number of characters, words and lines in a file).

\hfill Practical Periods: 30

\hfill Total Periods: 60

COURSE OUTCOMES

After the completion of this course, students will be able to:

  • Understand the basic programming constructs in C (K2)
  • Write functions in C (K2)
  • Develop C programs using arrays and pointers (K3)
  • Write programs using strings and structures (K3)
  • Do operations with files in C (K2).

TEXT BOOKS

  1. Byron Gottfried, “Programming with C”, (Schaum’s Outlines Series), McGraw-Hill Education, 3rd Edition, 2017.
  2. Brian W Kernighan, Dennis M Ritchie, “The C Programming Language”, Pearson Education India, 2nd Edition, 2015.

REFERENCES

  1. Reema Thareja, “Programming in C”, Oxford University Press, 2nd Edition, 2016.
  2. Yashwant Kanetkar, “Let Us C”, BPB Publications, 14th Edition, 2016.
  3. King K N, “C Programming: A Modern Approach”, W. W. Norton & Company, 2nd Edition, 2008.
  4. Herbert Schildt, “C The Complete Reference”, McGraw Hill Education, 4th Edition, 2017.
  5. Stephen G Kochan, “Programming in C”, 3rd edition, Pearson Ed, 2004.