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

I-I CPE SubjectLab Syllabus

Uploaded by

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

I-I CPE SubjectLab Syllabus

Uploaded by

ramesh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

R22 B.Tech.

ECE Syllabus JNTU HYDERABAD

EC103ES: C PROGRAMMING FOR ENGINEERS


B.Tech. I Year I Sem. L T P C
3 0 0 3
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

Page 9 of 138
R22 B.Tech. ECE Syllabus JNTU HYDERABAD

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.

Page 10 of 138
R22 B.Tech. ECE Syllabus JNTU HYDERABAD

EC108ES: C PROGRAMMING FOR ENGINEERS LABORATORY

B.Tech. I Year I Sem. L T P C


0 0 2 1
Course Outcomes: Upon completing this course, the students will be able to
1. Write algorithms and to draw flowcharts for solving problems and translate the
algorithms/flowcharts to programs (in C language).
2. Use functions to develop modular reusable code.
3. Use arrays, pointers, strings and structures to formulate algorithms and programs.
4. Understand Searching and sorting algorithms

Course PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12
CO1 3 2 1 1 1 1 - - 1 - 1 1
CO2 3 2 3 2 1 2 - - 1 - 1 1
CO3 3 3 2 1 1 2 - - 1 - 1 1
CO4 3 3 3 2 1 1 - - 1 1

List of Experiments:
1. Write a C program to find the sum of individual digits of a positive integer.
2. Fibonacci sequence is defined as follows: the first and second terms in the sequence are 0 and 1.
Subsequent terms are found by adding the preceding two terms in the sequence.
3. Write a C program to generate the first n terms of the sequence.
4. Write a C program to generate all the prime numbers between 1 and n, where n is a value supplied
by the user.
5. Write a C program to find the roots of a quadratic equation.
6. Write a C program to find the factorial of a given integer.
7. Write a C program to find the GCD (greatest common divisor) of two given integers.
8. Write a C program to solve Towers of Hanoi problem.
9. Write a C program, which takes two integer operands and one operator from the user, performs
the operation and then prints the result. (Consider the operators +,-,*, /, % and use Switch
Statement)
10. Write a C program to find both the largest and smallest number in a list of integers.
11. Write a C program that uses functions to perform the following:
i) Addition of Two Matrices ii) Multiplication of Two Matrices
12. Write a C program that uses functions to perform the following operations:
i) To insert a sub-string in to a given main string from a given position.
ii) To delete n Characters from a given position in a given string.
13. Write a C program to determine if the given string is a palindrome or not
14. Write a C program that displays the position or index in the string S where the string T begins, or
– 1 if S doesn’t contain T.
15. Write a C program to count the lines, words and characters in a given text.
16. Write a C program to generate Pascal’s triangle.
17. Write a C program to construct a pyramid of numbers
18. Write a C program to read in two numbers, x and n, and then compute the sum of this geometric
progression:
1+x+x2+x3+………….+xn
For example: if n is 3 and x is 5, then the program computes 1+5+25+125.
Print x, n, the sum
Perform error checking.
For example, the formula does not make sense for negative exponents – if n is less than 0.
Have your program print an error message if n<0, then go back and read in the next pair of numbers
of without computing the sum. Are any values of x also illegal ? If so, test for them too.

Page 16 of 138
R22 B.Tech. ECE Syllabus JNTU HYDERABAD

19. 2’s complement of a number is obtained by scanning it from right to left and complementing all the
bits after the first appearance of a 1. Thus 2’s complement of 11100 is 00100. Write a C program
to find the 2’s complement of a binary number.
20. Write a C program to convert a Roman numeral to its decimal equivalent.

21. Write a C program that uses functions to perform the following operations:
i) Reading a complex number
ii) Writing a complex number
iii) Addition of two complex numbers
iv) Multiplication of two complex numbers
(Note: represent complex number using a structure.)
22.
i. Write a C program which copies one file to another.
ii. Write a C program to reverse the first n characters in a file.
(Note: The file name and n are specified on the command line.)
23.
i. Write a C program to display the contents of a file.
ii. Write a C program to merge two files into a third file (i.e., the contents of the first file
followed by those of the second are put in the third file)

24. Write a C program that implements the following sorting methods to sort a given list of integers in
ascending order i) Bubble sort ii) Selection sort iii)Insertion sort
25. Write C programs that use both recursive and non recursive functions to perform the following
searching operations for a Key value in a given list of integers:
i) Linear search ii) Binary search

Page 17 of 138

You might also like