You are on page 1of 4

CURRICULUM 2009 10, With Effect From 2010 11 Department of Technical Education Diploma Course in Electrical and Electronics

cs Engineering Fourth semester Sub: C PROGRAMMING LAB Sub Code: Contact Hrs. / Week: 6 1.1 Problem solving using Computers. 1.1 Steps involved in problem solving using computers. 1.2 Define Algorithms 1.3 Explain characteristics of Algorithms. 1.4 Examples of Algorithms 1.5 Define flow chart 1.6 Draw flow chart symbols and know their purpose. 1.7 Examples of flow chart. 2.0 2.1 2.2 2.3 Introduction to C Introduction to C About ANSI C Standard Overview of complier and Interpreters 2.3.1 Any C Editor 2.3.2 Any C compiler 2.3.3 Any C Filer Structure of a C Program Programming rules Executing the Program Lexical elements of C Character Set, Delimiters, keywords Identifiers/Variables and constants 3.2.1 Rules for defining variables with examples 3.2.2 Types of constants with examples Data types, their memory size and the range 3.3.1 Integer data types- short, long, signed, unsigned 3.3.2 Character data type-signed, unsigned 3.3.3 Floats and doubles Declaring and initialising the variables 3.4.1 Examples Data type Conversion 3.5.1Write a program to illustrate data type conversion. Input and Output in C Data types and Conversion specifications 12 5 Contact Hrs. / Semester: 96 Contact Hrs 2

2.4 2.5 2.6 3.0 3.1 3.2 3.3

3.4 3.5 4 4.1

EE Fourth Semester C Programming Lab

Page 1 of 4

CURRICULUM 2009 10, With Effect From 2010 11 4.2 4.3 4.4 4.5 4.6 4.7 5.0 5.1 5.2 5.3 5.4 Escape sequences and their ASCII values Unformatted I/O functions ---getch(),getche(),getchar(),gets(),putch(),putchar(),puts() Formatted I/O functions -scanf(),printf() Illustrate above I/O functions with simple Programs Write a program to illustrate the effect of various Escape sequences. Commonly used library functions clrscr().

Operators and expression 18 Expression and its components - Operands, operators, parenthesis Types of operators and their symbolic representation Precedence/priority and their associatively/clubbing Arithmetic operators: +, -, *, /, % 5.4.1 Understand the use of parenthesis within an expression 5.4.2 Illustrate the usage, precedence and associativity of above operators with programs 5.5 Unary operators 5.5.1 Unary minus, increment, decrement, sizeof(), ampersand(&) and (type). 5.5.2 Illustrate the usage, precedence and associativity of above operators with programs 5.6 Assignment operators: Single assignment, multiple assignment, Additional assignment operators 5.6.1 Illustrate the usage, precedence and associativity of above operators with programs 5.7 Relational operators 5.7.1 Illustrate the usage, precedence and associativity of above operators with programs 5.8 Comma and Conditional operators (ternary) 5.8.1 Illustrate the usage, precedence and associativity of above operators with programs 5.9 Logical operators Illustrate the usage, precedence and associativity of above operators with programs 5.10 Bitwise operators Illustrate the usage, precedence and associativity of above operators with programs 6.0 6.1 6.2 6.3 Control structure Sequencing, decision statements(branching/selection) looping(iteration) Decision statements Simple if, if...else, ifelseif, switch...Case 6.1.1 Illustrate the decision making statements with programs Know the purpose of break and continue statement 6.2.1 Illustrate the break and continue statements with programs Loop control statements for ( ) , nested for( ) , while( ) , dowhile( ) 6.3.1 Illustrate the loop control statements with programs 15

7.0 7.1 7.2

Arrays and strings 18 Definition of Array, Declaration of array and its interpretation, array initialisation and associated rules Processing an array 7.2.1 Illustrate the array concepts with programs

EE Fourth Semester C Programming Lab

Page 2 of 4

CURRICULUM 2009 10, With Effect From 2010 11 7.3 7.4 Define Multi-dimensional array, its declaration, initialization and associated rules 7.3.1 Illustrate the multi-dimensional array concepts with programs Definition of string. 7.4.1 Represent string as one dimensional character type array 7.4.2 Initialisation of character type arrays 7.4.3 Use library functions to process strings- strlen( ) , strcpy( ), strcmp( ), strcat( ) etc., 7.4.4 Illustrate above concepts with programs Functions: Definition , library & user defined , reasons for using function in C , 15 function call , actual arguments ,function declaration , formal arguments, return statement , recursive function Illustrate above concepts with programs Tests Total 6 ___________ 96

8.0 8.1

C PROGRAMMING EXERCISES: Operators & Expressions Exercises 1 Program to Calculate voltage , current & resistance when any two parameters are given by using ohms law 2 Program to find equivalent resistance 3 resistances in the case of series & parallel circuits 3 Program to find equivalent capacitance 3 capacitances in the case of series & parallel circuits 4 Program to convert mechanical power into electrical power and vice versa 5 Program to calculate instantaneous voltage value of an alternating quantity for given Vmax, f and t. 6 Program to calculate rms value, average value and form factor of altenating quantity for given maximum value 7 Program to calculate inductive reactance , capacitive reactance for the given circuit parameters 8 Program to calculate impedance of RLC series circuit 9 Program to calculate real power , apparent power , reactive power and power factor in single phase AC system 10 Program to perform star - delta conversion and vice versa Decision making Exercises 11 Program to calculate energy bill for any consumer, for existing tariff and slab. Looping Exercises 12 Program to calculate current when voltage is varied from 1 to 10 volts for given value of resistance

EE Fourth Semester C Programming Lab

Page 3 of 4

CURRICULUM 2009 10, With Effect From 2010 11 13 Program to calculate the power consumed by the resistive load when current reaches rated value , stop the calculation of power for given rated value( using break ) 14 Program to get resonant condition & print resonant frequency for given values of R, L and C series circuit by varying frequency. 15 Program to calculate energy bill for LT, HT, EHT, for existing tariff and slab (use Switch. case) Array Excercises 16 Program to find maximum & minimum energy consumed in a week / fortnight 17 Program to read 10 electrical units and display them. Strings Exercise. 18 Program to enter your name, address and display them. Function Excercise 19 Program to calculate voltage for given values of current & resistance using function 20 Program to find the efficiency of DC motor using function. Note: Flowchart must be drawn for each program. References: 1 2 3 4 5 6 7 Programming with ANSI & Turbo C -- Ashok M Kamthane Programming with C -- Byron S Gottfried Programming in ANSI C -- Balaguruswamy Let us C -- Yaswanth Kanetkar Computer Concepts and C Programming Vikas Guptha - Wiley Dream Tech Basic of Computer and applications-Rajesh Hongal C Programming with Problem Solving by Jones and Harrow Wiley Dream Tech

Scheme of valuation
1 Record (Programs with flow charts) 2. Writing two programs with flow charts 3. Entering one program 4. Execution 5. Correct Result 5. Printout 6. Viva Total 5 30 10 15 15 05 20 100

EE Fourth Semester C Programming Lab

Page 4 of 4

You might also like