Beruflich Dokumente
Kultur Dokumente
Format For Instruction Plan [for Courses with Lectures and Labs ]
Course No. CSE101
FOUNDATIONS OF COMPUTING
Course Title:
L: 3
T: 0
P: 4
Cr: 5
Course Planner :-
TextBook
2. 3. 4. 5. 6.
Other Readings
Programming with ANSI & Turbo C, by Ashok N. Kamthane, Publishers: Pearson Education The C Programming Language, by B.W. Kernighan and D.M. Ritchie, Publishers: Prentice Hall of India, New Delhi Programming in ANSI C, by E.Balagurusamy, Publishers: Tata McGraw Hill Publishing Company Limited, New Delhi Computer science A structure programming approach Using C, by Behrauz A.Foruzan & Richard F.Gilberg, Publishers: Thomson Asia, 2001 Computer Fundamentals, by P.K. Sinha & Preeti Sinha, Publishers: BPB Publications
Sr. No.
7 8
http://cplus.about.com/od/thecden/Welcome_to_the_C_Area_with_Articles_about_C_Development.htm http://www.programmersheaven.com/tags/C/
Relevant Websites
Sr. No.
Web adress
Salient Features
9 10 11
A website designed to help you learn C or C++. Understandable C and C++ programming tutorials, compiler reviews, source code, tips and tricks. Learn how to write computer programs in C. C Programming Language website gives you a lot of helpful resources which help you to learn C programming.
Page 1 of 15
Part 1
Week 1
Problem Solving & Program Planning: Need for problem solving and planning a program Program design tools: algorithms, flow charts Pseudo codes and decision tables Basics of C Language: Phases in the development of a program, Compilers & Interpreters Declarations: Character Set, delimiters, keywords, identifiers, constants, variables.
->Reference :6,Chapter11 ->Reference :6,Chapter11 ->Reference :6,Chapter11 ->Reference :6,Chapter11 ->Reference :1,1Chap2(Pg2.1-2.5) ->Reference :1,1Chap2(Pg2.14-2.24) ->Reference :1,1Chap2(Pg2.12-2.14) ->Reference :1,1Chap2(Pg2.25-2.28) ->Reference :1,1Chap3(Pg3.1-3.21) ->Reference :1,1Chap4(Pg4.1-4.29) ->Reference :1,1Chap6(Pg6.2-6.9) ->Reference :1,1Chap6(Pg6.9-6.33)
HomeWork 1 Allocation
Week 2
Lecture 4 Lecture 5
Lecture 6
Week 3
Operators & Expressions: Various operators, Precedence & Associativity Handling Input/Output: Unformatted & Formatted I/O Decision making statements if, else if Control Statements: For, Do while, while,
Week 4
Lecture 10
Part 2
Week 4
Lecture 11 Lecture 12
Control transfer statements - break, continue. Functions: Defining and accessing a function, Function prototypes Functions & Introduction to Pointers: Passing arguments call by value
Week 5
Lecture 13
Page 2 of 15
Part 2
Week 5
Lecture 14 Lecture 15
Declaring and initializing pointers; call by address Recursive functions. Arrays: Defining arrays ;declaration and initialization of arrays I/O & Processing of arrays Dynamic memory Allocation, memory leak Arrays & Functions: Passing array to a function Arrays and Strings; built-in library functions to manipulate strings
->Reference :1,1Chap10(Pg10.5-10.16) ->Reference :1,1Chap7(Pg7.26-7.33) ->Reference :1,1Chap9(Pg9.1-9.7) ->Reference :1,1Chap9(Pg9.7-9.10) ->Reference :1,1Chap10(Pg10.20-10.23) ->Reference :1,1Chap9(Pg9.10-9.24) ->Reference :1,1Chap9(Pg9.32-9.35) ->Reference :4,4Chap8(Pg8.1-8.8) ->Reference :1,1Chap9(Pg9.32-9.35)
HomeWork 2 Submission
Week 6
Week 7
Lecture 19 Lecture 20
Lecture 21
MID-TERM
Part 3
Week 8
Structures: Defining and processing structures, Declaring a structure (globally and locally) Memory requirement of structure, inputting/ outputting & processing using structures Structures & Unions: Array of structures, nested structures Self-referential Unions; union of structures; bit-fields.
->Reference :1,1:Chap11(Pg11.1-11.7) ->Reference :1,1:Chap11(Pg11.8-11.20) ->Reference :3,3:Chap6(Pg6.1-6.3) ->Reference :1,1:Chap11(Pg11.1-11.6) ->Reference :1,1:Chap13(Pg13.17-13.27) ->Reference :1,1:Chap10(Pg10.23-10.26) ->Reference :1,1:Chap10(Pg10.16-10.19) ->Reference :1,1:Chap11(Pg11.24-11.41)
HomeWork 3 Allocation
Week 9
Lecture 25
Lecture 26 Lecture 27
Week 10
Pointers: pointer arithmetic Array & Pointers, pointers and strings Pointers and structures; Pointers and functions
Lecture 28
Page 3 of 15
Part 3
Week 10
Lecture 29
Storage Classes: Storage classes and their usage, concept of scope ,visibility and lifetime of variables
->Reference :1,1:Chap8(Pg8.1-8.11)
HomeWork 4 Allocation
Part 4
Week 10 Week 11
Lecture 30 Lecture 31
Local & global variable/function declaration Various storage classes(Automatic and Register class)
->Reference :1,1:Chap8(Pg8.2-8.11) ->Reference :1,1:Chap8(Pg8.2-8.5) ->Reference :1,1:Chap13(Pg13.1-13.4) ->Reference :1,1:Chap8(Pg8.5-8.15) ->Reference :1,1:Chap12(Pg12.1-12.11) ->Reference :1,1:Chap12(Pg12.1-12.11) ->Reference :4,4:Chap12(Pg12.1-12.6) ->Reference :4,4:Chap12(Pg12.1-12.6) ->Reference :1,1:Chap2(Pg2.10-2.12) ->Reference :1,1:Chap14(Pg14.1-14.7) ->Reference :1,1:Chap14(Pg14.12-14.21)
HomeWork 3 Submission
Lecture 32 Lecture 33
Week 12
Static and External storage class File handling: Opening a file, file opening modes Reading from and writing to files Manipulating file pointers using fseek(), rewind() and ftell() functions Random accessing files, file Updation Managing multi file programs and projects: making executable files Creating your own library files and header files Adding user defined functions in existing library.
HomeWork 4 Submission
Week 13
Spill Over
Week 14
Week 15
Lecture 43
Page 4 of 15
Homework 1
Problem Solving & Program Planning: Need for problem solving and planning a program, Program design tools - algorithms, flow charts, pseudo codes and decision tables, Basics of C Language: Phases in the development of a program, Compilers & Interpreters Declarations: Character Set, delimiters, keywords, identifiers, constants, variables, data types, declaring & Initializing variables. Opreators & Expressions: Various operators, precedence & Associativity, Type Conversion Handling Input/Output: Unformatted & Formatted I/O Decision making statements if, else if. Control Statements: For, do while, while, Control transfer statements - break, continue. Functions: Defining and accessing a function Functions & Introduction to Pointers: Passing arguments call by value, Declaring and initializing pointers; call by address, function prototypes, recursive functions. Arrays: Defining arrays ;declaration and initialization of arrays, I/O & Processing of arrays , Dynamic memory Allocation, memory leak Arrays & Functions: Passing array to a function; Arrays and Strings; built-in library functions to manipulate strings, array of strings, passing strings to a function. Structures: Defining and processing structures, Declaring a structure (globally and locally), memory requirement of structure, inputting/ outputting & processing using structures. Structures & Unions: Array of structures, nested structures, self-referential Unions; union of structures; bit-fields. Pointers: pointer arithmetic; Array & Pointers, pointers and strings; pointers and structures; pointers and functions Dynamic memory Allocation. File handling: Opening a file, file opening modes, reading from and writing to files, manipulating file pointers using fseek(), rewind() and ftell() functions, random accessing files, file updation. Storage Classes: Storage classes and their usage, concept of scope ,visibility and lifetime of variables, local & global variable/function declaration, various storage classes(Automatic, Register, Static and External storage class). Managing multi file programs and projects: making executable files ,creating your own library files and header files, adding user defined functions in existing library.
Individual
Homework 2
Individual
Homework 3
Individual
Homework 4
Individual
*Normally all the homeworks shall be submitted online but in special courses where homeworks cannot be submited online , the insructor can edit the mode of submission while entering the IP Details
Page 5 of 15
1 10 3 4
Total :-
25 3 15
25 30 45
100
* In ENG courses wherever the total exceeds 100, consider x best out of y components of CA, as explained in teacher's guide available on the UMS
List of suggested topics for term paper[at least 15] (Student to spend about 15 hrs on any one specified term paper)
Sr. No. Topic
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Scientific calculator Digital Calendar Mobile Service provider database University Management System Employee Details Salary Slip Generation Expenses Calculator Hardware Management System C Programming Database Books Sale and Purchase System Attendance Record System Examination Seating Plan System Paper Setter System Parking Record System Gate Pass Generation System
Page 6 of 15
*Each experiment of the lab will be evaluated using following relative scheme:
Component
% of Marks
VIVA WR J/E
30 20 50
Page 7 of 15
Before Mid-Term
Implementation 1
Write an algorithm to perform Arithmetic Operations on two numbers. Draw a flowchart to perform Arithmetic Operations on two numbers. Write a pseudo code to perform Arithmetic Operations on two numbers. Write a program to perform Arithmetic Operations on two numbers. Write a program to use four basic data types of C. Write a program to demonstrate the concept of constant and variable. Write a program to demonstrate different types of operators in C with their precedence level. Write a program to demonstrate the purpose of different formatted and unformatted I/O functions. Write a program to demonstrate two different types of branching. Write a loop that will calculate the sum of every third integer, beginning with i=2( i.e calculate the sum 2+5+8+11+ .....) for all values of i that are less than 100. Write the loop in three different ways.
PC / Turbo C /Projector
Implementation 2
PC / Turbo C /Projector
Implementation 3
PC / Turbo C /Projector
Implementation 4
PC / Turbo C /Projector
Implementation 5 Implementation 6
Implementation 7
PC / Turbo C /Projector
Implementation 8
PC / Turbo C /Projector
Implementation 9 Implementation 10
Page 8 of 15
Implementation 11
Write an interactive C program that will convert a positive integer quantity to a roman numeral.(e.g. 12 will be converted to XII). Design the program so that it will execute repeatedly, until a zero is read in from the keyboard. Write a complete C program that will calculate the real roots of the quadratic equation: ax2 + bx + c =0 Write a function that will allow a floating-point number to be raised to an integer power. In other words, we wish to evaluate the formula y=xn. Where x and y are floating point variables and n is an integer variable. Write a program which declares two pointers whose objects are the integer variables i and j. Write a program which includes a recursive function to determine the cumulative sum of n floating-point numbers. Read a new number into the computer during each call to the recursive function. Write an interactive C program to process the exam scores for a group of students in a C programming course. Begin by specifying the number of exam scores for each student and then each students name and roll number. Calculate an overall class average and display with follow by name and roll no.
PC / Turbo C /Projector
Implementation 12
PC / Turbo C /Projector
Implementation 13
PC / Turbo C /Projector
Implementation 14
PC / Turbo C /Projector
Implementation 15
PC / Turbo C /Projector
Implementation 16
PC / Turbo C /Projector
Page 9 of 15
Implementation 17
Write an interactive C program that will simulate a game of Bingo, print each letter-number combination as it is drawn (randomly generated). Be sure that no combination is drawn more than once. Write a program that processes a multiple lines of text. First enter and store a multiple lines of text and then determine the number of vowels, consonants, digits, whitespace characters and other characters for each line. Finally determine the average number of vowels per line, consonants per line, etc. Write and execute the program with the help of two dimensional arrays of characters. Write a function in C that will enter the line of text, store it in array and then display it backwards. Allow the length of the line to be unspecified (terminated by pressing the Enter key), but assume that it will not exceed 80 characters. Write a function in C that will generate a table of values for the equation: y= 2e-0.1t sin 0.5 t Where t varies between 0 and 60. Allow the size of the t-increment to be entered as an input parameter.
PC / Turbo C /Projector
Implementation 18
PC / Turbo C /Projector
Implementation 19
PC / Turbo C /Projector
Implementation 20
PC / Turbo C /Projector
Page 10 of 15
Implementation 21
Write an interactive C program that will accept the name of a country as input and display the corresponding capital, and vice versa. Design the program so that it executes repeatedly, until the word End is entered as input. Write an interactive C program that will encode or decode a line of text. To encode a line of text, convert each character, including blank to its ASCII equivalent. Read in the first m elements of a one-dimensional floating-point array. Calculate the sum of these elements, the mean, the deviations, and the standard deviation, the algebraic maximum and algebraic minimum. Suppose A is a table of floating point numbers having k rows and m columns and B is a table of floating point numbers having m rows and n columns. We wish to generate a new table, C , where each element of C is determined by: C[i][j]=A[i][1] * B[1][j] + A[i][2] * B[2][j] + .....+ A[i][m] * B[m][j].
PC / Turbo C /Projector
Implementation 22
PC / Turbo C /Projector
Implementation 23
PC / Turbo C /Projector
Implementation 24
PC / Turbo C /Projector
After Mid-Term
Implementation 25
Define a structure that contains the following two members: a. an integer quantity called won b. an integer quantity called lost c. a floating-point quantity called percentage d. a 40-element character array called name Include the user-defined data type team within the definition
PC / Turbo C /Projector
Page 11 of 15
Implementation 26
Declare a variable t to be a structure variable of type team as described in problem 25. Now however initialize t as follows: Name: INDIA Won: 20 Lost: 2 Percentage: 90.9 Write a program that will display the size of the memory block associated with the variable t which was described in problem #26. Define a structure of type hms containing three integer members, called hour, minute and second, respectively. Then define a union containing two members, each a structure of type hms. Call the union members local and home respectively. Declare a pointer variable called time that points to this union. Define a self referential structure containing the following three members: a. a30-element character array called name b. a structure named stats, of type team, as defined in problem #25 c. a pointer to another structure of this same type, called next
PC / Turbo C /Projector
Implementation 27
PC / Turbo C /Projector
Implementation 28
PC / Turbo C /Projector
Implementation 29
PC / Turbo C /Projector
Page 12 of 15
Implementation 30
Write a C program that will accept the following information for each team in a baseball or a football league: a. Team name, including the city b. Number of wins c. Number of losses For a baseball/football team, add the following information: d. Number of hits e. Number of runs f. Number of errors g. Number of extra inning games Enter this information for all of the teams in the league. Then reorder and print the list of teams according to their win-lose records. Write a program for each of the following situations: a. Declare two pointers whose objects are the integer variables i and j b. Declare a pointer to a floating-point quantity and a pointer to a double precision quantity c. Declare a function that accepts two integer arguments and returns a pointer to a long integer. Write a program to declare a function that accepts another function as an argument and returns a pointer to a character. The function passed as an argument will accept an integer argument and returns an integer quantity.
PC / Turbo C /Projector
Implementation 31
PC / Turbo C /Projector
Implementation 32
PC / Turbo C /Projector
Page 13 of 15
Implementation 33
Write a complete C program to implement vector multiplication using pointer notation in place of arrays. Write a complete C program, using pointer notation that will generate a table containing the following three columns: t aebt sin ct aebt cos ct Write a program to calculate factorial of a number with the help of auto storage class. Write a program to find the maximum value of number entered by the user in a specified interval of time. Write a program to read several lines of text and determine the average number of characters per line. Write a program to calculate successive Fibonacci numbers with the help of static storage class. Write a program to display names of the students mentioned in another C file with the help of external variables. Write a program to open the existing file for reading and writing employee information. Write a program to demonstrate two different approaches of updating a file. Write a file oriented C program that will save the student exam scores for n courses.
PC / Turbo C /Projector
Implementation 34
PC / Turbo C /Projector
Implementation 35
PC / Turbo C /Projector
Implementation 36
PC / Turbo C /Projector
Implementation 37
PC / Turbo C /Projector
Implementation 38
PC / Turbo C /Projector
Implementation 39
PC / Turbo C /Projector
Implementation 40
PC / Turbo C /Projector
Implementation 41
PC / Turbo C /Projector
Implementation 42
PC / Turbo C /Projector
Page 14 of 15
Implementation 43
Write a program to read the data saved in problem #42. Then create a report containing the name, exam scores and average grade for each student. Write a complete C program that can be used a simple line oriented text editor. This program must have the following capabilities: a. Enter several lines of text and store in a data file b. List the data file c. Retrieve and display a particular line, determined by line number d. Insert n lines e. Delete n lines f. Save the newly edited text and end the computation. Carry out each of these tasks in response to a one letter command, preceded by a dollar sign.
PC / Turbo C /Projector
Implementation 44
PC / Turbo C /Projector
Spill Over
Implementation 45
Write a program that will concatenate two files; that is, append the contents of one file at the end of another and write the result into a third file. You must be able to execute the command at DOS prompt as follows: C>Concat source1.txt source2.txt target.txt Write a program which prints out only those lines from a file which are containing more then 80 character. Also print out the line numbers of these lines.
PC / Turbo C /Projector
Implementation 46
PC / Turbo C /Projector
Page 15 of 15