JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

EC103ES: C PROGRAMMING FOR ENGINEERS

B.Tech I Year I Semester (R22)

Course Objectives:

  • 1. To learn the fundamentals of computers.
  • 2. To understand the various steps in Program development.
  • 3. To learn the syntax and semantics of C Programming Language.
  • 4. To learn the usage of structured programming approach in solving problems.

Course Outcomes

Upon completing this course, the students will be able to

  • 1. Draw flowcharts for solving arithmetic and logical problems
  • 2. Develop modular reusable code by understanding concepts of functions.
  • 3. Formulate algorithms and programs using arrays, pointers, strings and structures.
  • 4. Write a programs using Searching and sorting algorithms Course PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 CO1 3 2 1 1 - 1 - - - - - 1 CO2 3 2 3 2 - 2 - - - - - 1 CO3 3 3 2 1 - 2 - 1 - - - 1 CO4 3 3 3 2 1 - 1

UNIT - I

Introduction to Computer Algorithms and Programming Components of a computer system: Memory, processor, I/O devices, storage, operating system, the concept of assembler, compiler, interpreter, loader, and linker. From algorithm to program: Representation of an algorithm, flowchart, Pseudocode with examples, converting algorithms to programs. Programming Basics: Structure of C program, writing and executing the first C program, Syntax and logical errors in compilation, object, and executable code. Components of C language, standard I/O in C, data types, variables and constants, memory storage, and storage classes.

UNIT - II

Expressions and Statements Expressions and their evaluation: Operands and Operators, formation of expressions using arithmetic, relational, logical, and bitwise operators, precedence and associativity rules, mixed operands, type conversion, and evaluation of expressions. Statements: Simple and compound statements, Conditional Branching: if and switch statements, nested if-else, dangling else problem, use of break and default with switch. Iteration and loops: use of while, do-while and for loops, nested loops, use of break and continue statements.

UNIT - III

Functions and Arrays Designing Structured Programs: Introduction to functions, advantages of modularizing a program into functions, types of functions, passing parameters to functions: call by value, call by reference, passing arrays to functions, recursion with example programs. Arrays: Array notation and representation, manipulating array elements, using multi-dimensional arrays, character arrays, C strings, string input/output functions, Array of strings, string manipulation functions with example programs.

UNIT - IV

Pointers and File handling Pointers: Introduction, declaration, applications, dynamic memory allocation (malloc, calloc, realloc, free), use of pointers in self-referential structures. File handling: File I/O functions, standard C pre-processors, defining and calling macros, command- line arguments.

UNIT - V

Derived types And Basic Algorithms: Structures, Union, Enums and Bit-fields: Defining, declaring, and usage of structures, unions, and their arrays, passing structures, and unions to functions, introduction to enums and bit-fields. Basic Algorithms: Searching and Sorting Algorithms (Bubble, Insertion, and Selection), finding roots of equations, notion of order of complexity through example programs.

TEXT BOOKS:

  • 1. B. A. Forouzan and R. F. Gilberg -Programming & Data Structures, 3rd Ed., Cengage Learning`
  • 2. Byron Gottfried - Schaum’s Outline of Programming with C, McGraw-Hill

REFERENCE BOOKS:

  • 1. Ajay Mittal - Programming in C: A practical approach, Pearson Education, 2010
  • 2. Kernighan Brian W. and Ritchie Dennis M.- The C programming, Pearson Education.
  • 3. J. R. Hanlyand, E. B. Koffman -Problem Solving and Program Design, 5th Ed., Pearson Education.
  • 4. H. Cheng - C for Engineers and Scientists, McGraw-Hill International Edition
  • 5. V. Rajaraman - Computer Basics and C Programming, PHI Learning, 2015.

Loading Question Papers

Fetching data from database...