AUTONOMOUS - Bapatla Engineering College
AUTONOMOUS - Bapatla Engineering College
AUTONOMOUS - Bapatla Engineering College
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
COMPUTER PROGRAMMING WITH C<br />
(Common to all Branches)<br />
CS116/ CS01<br />
Lectures : 4 Periods/Week, Tutorial: 1 Continuous Assessment : 40<br />
Final Exam : 3 hours Final Exam Marks : 60<br />
UNIT – I<br />
(22 Periods)<br />
Introduction:<br />
Computer Fundamentals: Computer and it’s components, hardware/software, algorithm,<br />
characteristics of algorithms, flowchart, symbols used in flowchart, history of C, basic<br />
structure of a C program.<br />
C Tokens: Character set, variables, keywords, data types and sizes, type qualifiers, numeric<br />
constants and their forms of representation, character constants, string constants,<br />
declaration and initialization of variables.<br />
Operators & Expressions: Arithmetic operators and expressions, type‐conversion rules,<br />
coercion, assignment operators and expressions, increment and decrement operators,<br />
conditional operator, statements, preprocessor directives, input/ output functions and<br />
other library functions. Relational operators and expressions, boolean operators and<br />
expressions, operator precedence and associativity.<br />
Control Statements: if‐else statement, else‐lf statement and switch statement.<br />
Programming Exercises for Unit I :<br />
C‐expressions for algebraic expressions, evaluation of arithmetic and boolean expressions.<br />
Syntactic errors in a given program, output of a given program, values of variables at the<br />
end of execution of a program fragment, filling the blanks in a given program. Programs<br />
using Scientific and <strong>Engineering</strong> formulae. Finding the largest of the three given numbers.<br />
Computation of discount amount on different types of products with different discount<br />
percentages. Finding the class of an input character, finding the type of triangle formed with<br />
the given sides, computation of income‐tax, computation of electricity bill and conversion of<br />
lower case character to its upper case.<br />
UNIT – II<br />
(21 Periods)<br />
Control Statements: while loop, for loop, do while loop, nested Control statements, break<br />
and continue statements.<br />
Arrays: One‐Dimensional numeric and character arrays and Two‐Dimensional numeric and<br />
character arrays.<br />
Programming Exercises for Unit ‐ II:<br />
To print the sum of the digits of a given number and to display the image of a given number.<br />
To find whether a given number is prime, printing Fibonacci sequence and to find prime<br />
factors of a given number. To print graphic patterns of symbols and numbers and<br />
computation of statistical parameters of a given list of numbers. To find the length of a<br />
string, compare strings, reverse a string, copy a string and to find whether the given string is<br />
Department of Computer Science & <strong>Engineering</strong><br />
Page 31 of 31