Lectures: 3 Periods/Week | Sessional Marks: 30 |
University Exam: 3 Hours | University Examination Marks: 70 |
UNIT-I
Introduction: Computer Fundamentals: Computer & its Components, Hardware/Software, Algorithm, Characteristics of algorithm, Flowchart, Symbols are used in flowchart, history of C, Basic structure of C, C language features.
C Tokens: Character set, Variables, Keywords, Data types and sizes, Type qualifiers, Numeric Constants and their forms of representation, Character Constants, String Constants, Declarations and Initialization of variables.
Operators & Expressions: Arithmetic operators, and expressions, Type-conversion rules, Coercion, Assignment operators and expressions, Increment and decrement operator, Conditional operator, Statements, Preprocessor directives, Input/ Output functions and other library functions. Relational operators and expressions. Boolean operators and expressions.
Programming Exercises:
C-Expressions for algebraic expressions, Evaluation of arithmetic and boolean expressions. Syntactic errors in a given program, Output of a given program, Values of variables at the end of execution of a program fragment, Filling the blanks in a given program, Computation of values using scientific and Engineering formulae, Finding the largest of three given numbers.
>
UNIT-II
Conditional Statements: Blocks, If-Else statement, Else-lf statement and Switch statement.
Iterative Statements: While loop, For loop, Do-While loop, Break, and continue.
Arrays: One-dimensional and character arrays, Two-dimensional numeric arrays.
Programming Exercises
Computation of discount on different types of products with different ranges of discount Finding the type of triangle formed by the given sides, Computation of income-tax, Computation of Electricity bill, Conversion of lower case character to its upper case, Finding the class of an input character; Sum of the digits of a given number, Image of a given number, To find whether a given number is-prime; Fibonacci; abundant; perfect, Strong, Amstrong; deficient, Prime factors of a given number, Merging of lists, Transpose of a matrix, Product and sum of matrices, String processing, length of a string, comparison of strings, reversing a string, copying a string, Sorting of names using arrays, Graphics patterns, to print prime numbers and Fibonacci numbers in a given range and Amicable numbers.
UNIT-III
Functions: Function Definition, types of User Defined Functions, Parameter passing mechanisms, and simple recursion.
Scope & extent: Scope rules, Storage Classes, Multi-file compilation.
Pointers: Pointers Arithmetic, Character array of pointers, Dynamic memory allocation, array of Pointer, Pointer to arrays.
UNIT-IV
Structures: Structures, Array of structures, structures within structures, Pointer to structures, self referential structures, Unions.
Files: File Handling functions, File error handling functions, Command-line arguments.