34
Lecture Plan 1 Faculty:- Mr.Akshat Agrawal Semester:-I Class:-IT-B Course Code:- CSE-101-E Subject :-Fundamental of Fundamental of Computer Programming Unit:-I S. No. Topic :- Anatomy of digital computer ,History, Classifications of computer Time Allotted :- 1. Introduction Digital computer carry out operations on discrete data values and operates in a word of binary ones and zeros. History- The IT-Banical Era (1623-1945) , First Generation Electronic Computers (1937-1953) , Second Generation (1954-1962) , Third Generation (1963-1972) , Fourth Generation (1972-1984) , Fifth Generation (1984- 1990) , Sixth Generation (1990 - ) 10 30 5 5 2 Division of the Topic Digital computer History of computer –first to sixth generation Classification of computer-Making principle, application capabilities, cost and processing manner. 3. Conclusion Students understands the concept of digital computer. History of computer contained first computing device., various computer generations. In classification of computer there are some basis on which computers are classified. 4 Question / Answer How you will define a computer.. Classify different type of computer. Assignment to be given:- Nil Reference Readings:- Commuter Fundamental by P.K.Sinha

Lect Plan Focp

Embed Size (px)

Citation preview

Page 1: Lect Plan Focp

Lecture Plan 1

Faculty:-Mr.Akshat Agrawal Semester:-I Class:-IT-B Course Code:-CSE-101-E

Subject:-Fundamental of Fundamental of Computer Programming Unit:-I

S. No.Topic :- Anatomy of digital computer ,History, Classifications of computer Time

Allotted:-

1. Introduction Digital computer carry out operations on discrete data values and operates in a word of binary ones and zeros.History- The IT-Banical Era (1623-1945) , First Generation Electronic Computers (1937-1953), Second Generation (1954-1962), Third Generation (1963-1972), Fourth Generation (1972-1984), Fifth Generation (1984-1990), Sixth Generation (1990 - ) Classification of computer-Digital, analog, hybrid computer, super , pc computer, main computer.

10

30

5

5

2 Division of the Topic Digital computer History of computer –first to sixth generation Classification of computer-Making principle, application capabilities, cost and processing manner.

3. Conclusion Students understands the concept of digital computer. History of computer contained first computing device., various computer generations. In classification of computer there are some basis on which computers are classified.

4 Question / AnswerHow you will define a computer..Classify different type of computer.

Assignment to be given:-Nil

Reference Readings:- Commuter Fundamental by P.K.Sinha The c programming language by Dennis M. Ritche, The c programming language by Y.M.Kanitkar

Page 2: Lect Plan Focp

Lecture Plan 2Faclty:-Mr Akshat Agrawal Semester:- I Class:- IT-B Course Code:- CSE-101-ESubject:- Fundamental of Computer Programming Unit:-I

S. No.Topic :-Memory units, Main memory and auxiliary storage device Time

Allotted:-

1. IntroductionThe terms "storage" or "memory" refer to the parts of a digital computer that retain physical state (data) for some interval of time, possibly even after electrical power to the computer is turned off. Main memory- Programs to be executed by the computer are placed in main memory and the CPU fetches each instruction in turn from memory and executes it. Main memory is fast and limited in capacity. Main memory cannot retain information when the computer is switched off. Main memory consists of a series of locations called bytes, each byte being eight bits.Memory other than main memory; generally a mass-storage subsystem containing disk drives and backup tape drives, controller(s) and buffer memory (also called peripheral memory).

10

30

5

5

2 Division of the Topic Memory unit Main memory( also called as primary memory) RAM.ROM,PROM,EPROM. Auxiliary memory(also called as secondary memory) HDD,FLOPPY DISC, COPMACT DISC.

3. Conclusion Concept of memory successfully covered with diagram. Memory refer to the parts of a digital computer that retain physical state (data) for some interval of time. Student understand the topic of main memory and auxiliary memory.

4 Question / Answer

What is difference between primary and secondary memory?

Assignment to be given:- Nil

Reference Readings:- Commuter Fundamental by P.K.Sinha The c programming language by Dennis M. Ritche, The c programming language by Y.M.Kanitkar

Page 3: Lect Plan Focp

Lecture Plan 3

Faculty:-Mr. Akshat Agrawal Semester:- I Class:- IT-B Course Code:- CSE-101-E

Subject:- Fundamental of Computer Programming Unit:-I

S. No. Topic :-Input and output device, radix number system, decimal number system.Time Allotted:-

1. IntroductionInput Device-Input devices allow the user to input information (data) into the computer for analysis or storage, as well as give commands to the computer. Examples of input devices are keyboards, scanners, mice, bar-wands, and touch screens. Output device-A range of devices can be connected to the output ports. e.g. –printer, monitor, plotterDecimal number system- which have base 10.

10

30

5

5

2 Division of the TopicInput Device-Keyboards, scanners, mice, bar-wands, touch screen.Output Device-printer, monitor, plotter.Radix number system.Decimal number system.

3. Conclusion Students understood the input output device and various number systems. Input devices are keyboards, scanners, mice, bar-wands, and touch screens. Covered output devices which were mainly printer, monitor, and plotter. Covered successfully radix number system, decimal number system.

4 Question / Answer

List the various input device. List the various output devices.

Assignment to be given:- Nil

Reference Readings:- Commuter Fundamental by P.K.Sinha The c programming language by Dennis M. Ritche, The c programming language by Y.M.Kanitkar

Page 4: Lect Plan Focp

Lecture Plan 4

Faclty:-Mr. Akshat Agrawal Semester:- I Class:- IT-B Course Code:-CSE-101-E

Subject:- Fundamental of Computer Programming Unit:-I

S. No.Topic :-Octal, hexadecimal number system and their interconversion. Time

Allotted:-

1. IntroductionOctal number system-The number system having base 8 is called as octal number system.Hexadecimal number system-the number system which have base 16.Octal number are converted to hexa first converting into binary from octal then in hexa and vice versa.

10

30

5

5

2 Division of the TopicOctal number systemHexadecimal number system.Base conversion from octal to hexadecimal and vice versa.

3. Conclusion Covered successfully the topic on octal, hexadecimal number system and also Covered how they are converted from one base to another.

4 Question / Answer Convert (146) base 8 to base 16. Convert (AD96) base 16 to base 8.

Assignment to be given:- Nil

Reference Readings:- Commuter Fundamental by P.K.Sinha The c programming language by Dennis M. Ritche, The c programming language by Y.M.Kanitkar

Lecture Plan 5

Page 5: Lect Plan Focp

Faculty:- Mr. Akshat Agrawal Semester:- I Class:- IT-B Course Code:- CSE-101-E

Subject:- Fundamental of Computer Programming Unit:-I

S. No. Topic :- Representation of informationTime Allotted:-

1. IntroductionRepresentation of information- Every information is stored in memory. The memory is divided into individually accessible cells or units. Information is stored in memory units in groups of bits. Group of bit is called as word. Characters are represented using one byte (8 bits). Integers are represented using tow bytes. While float are represented using 4 bytes.

10

30

5

5

2 Division of the Topic Representation of information. Representation of character. Representation of integer. Representation of float.

3. Conclusion Students understand how information is represented inside a computer which is in the form of 0’s and 1’s. Representation of integer character and float no system also covered.

4 Question / Answer What is information?

Assignment to be given:- Nil

Reference Readings:- Commuter Fundamental by P.K.Sinha The c programming language by Dennis M. Ritche, The c programming language by Y.M.Kanitkar

Page 6: Lect Plan Focp

Lecture Plan 6

Faclty:-Mr. Akshat Agrawal Semester:- I Class:- IT-B Course Code:-CSE-101-E

Subject:- Fundamental of Computer Programming Unit:-I

S. No.Topic:-Base conversion from one system to another system. Time

Allotted:-

1. IntroductionBase conversion-we can convert base ten numbers to other bases, from base two through base sixteen and vice versa. This line should contain the decimal or hexadecimal representation of the corresponding hexadecimal or decimal number. Binary to other number system system others to binry number sytem.

10

30

5

5

2 Division of the Topic Base conversion Binary to other and vice versa. Octal to other number system and vice versa. Decimal to others and vice versa Hexadecimal to others and vice versa.

3. Conclusion Covered successfully the topic on base conversion from one system to others system and vice versa.

4 Question / Answer Convert (1462) base 8 to base 16. Convert (ADC96) base 16 to base 8. Convert (4589) base 10 to base

Assignment to be given: - Nil

Reference Readings: - Commuter Fundamental by P.K.Sinha The c programming language by Dennis M. Ritchie, The c programming language by Y.M.Kanitkar

Lecture Plan 7

Page 7: Lect Plan Focp

Faclty:-Mr. Akshat Agrawal Semester: - I Class: - IT-B Course Code: - CSE-101-E

Subject: - Fundamental of Computer Programming Unit:-IV

S. No.Topic :-Machine, assembly, high level language, assembler, compiler, interpreter Time

Allotted:-

1. Introduction Machine languages are the only languages understood by computers. While easily understood by computers, machine languages are almost impossible for humans to use because they consist entirely of numbers. Programmers, therefore, use either a high-level programming language or an assembly language. An assembly language contains the same instructions as a machine language, but the instructions and variables have names instead of being just numbers. Programs written in high-level languages are translated into assembly language or machine language by a compiler. Assembly language programs are translated into machine language by a program called an assembler.

10

30

5

5

2 Division of the Topic Machine Language Assembly language High level language Assembler Compiler Interpreter

3. Conclusion Student understood the machine language which is in form of 0’s and 1’s. An assembly language contains the same instructions as a machine language, but the Instructions and variables have names instead of being just number. High level Language is easily understandable. Assembler compiler, interpreter covered.

4 Question / Answer What is difference between assembly, machine, and high level language?

Assignment to be given: - Nil

Reference Readings: - Commuter Fundamental by P.K.Sinha The c programming language by Dennis M. Ritchie, The c programming language by Y.M.Kanitkar

Page 8: Lect Plan Focp

Lecture Plan 8

Faclty:-Mr. Akshat Agrawal Semester: - I Class: - IT-B Course Code: - CSE-101-E

Subject: - Fundamental of Computer Programming Unit:-IV

S. No.Topic :-Debuggers, programming fundamental, problem definition, linker and loader

Time Allotted:-

1. IntroductionDebuggers- A debugger is a computer program that is used to debug (and sometimes test or optimize) other programsProgramming fundamental- A computer program is a list of commands. These commands control the interface which in turn is connected to a robotic device. Normally, when writing a program, a flow chart is drawn first and this sets out clearly the sequence of instructionsLinker- A program that resolves cross-references between separately compiled or assembled object modules and then assigns final addresses to create a single relocatable load module. Loader-That loads translated program into memory.

10

30

5

5

2 Division of the Topic Debuggers Programming fundamental Problem definition Linker Loader

3. Conclusion Debugger is a program which is used to find the error in other program. A computer program is a list of commands. These commands control the interface which in turn is connected to a robotic device Student understand the concept of linker and loader which loads the translated program into memory

4 Question / Answer What is difference between linker and loader?

Assignment to be given: - Q1-Draw the block diagram of computer system and explain its working. Q2.-What do you mean by complement of a number. How complements are useful for computer Arithmetic. Q3-Explain Machine, assembly and high level language/ Q4- Describe following-compiler, loader, linker, interpreter

Reference Readings: - Commuter Fundamental by P.K.Sinha The c programming language by Dennis M. Ritche, The c programming language by Y.M.Kanitkar

Page 9: Lect Plan Focp

Lecture Plan 9

Faclty:-Mr. Akshat Agrawal Semester:- I Class:- IT-B Course Code:- CSE-101-E

Subject:- Fundamental of Computer Programming Unit:-IV

S. No.Topic :-Flowcharts and their symbols Time

Allotted:-

1. IntroductionFlow chart- A graphical representation for the definition, analysis, or solution of a problem, in which symbols are used to represent operations, data, flow, equipment, etcSymbols of flow chart- Termination, Data, decision, process box, connectors, arrows.

10

30

5

5

2 Division of the Topic

Flow chartVarious symbol of flow chart. Termination, dicision,process, input/output box.

3. Conclusion Flow chart is a graphical representation of a problem. Various flow chart symbols discussed using flow chart.

4 Question / Answer Draw a flow chart of find greatest number among three numbers.

Assignment to be given:- Nil

Reference Readings:- Commuter Fundamental by P.K.Sinha The c programming language by Dennis M. Ritche, The c programming language by Y.M.Kanitkar

Page 10: Lect Plan Focp

Lecture Plan 10

Faclty:-Mr. Akshat Agrawal Semester:- I Class:- IT-B Course Code:- CSE-101-E

Subject:- Fundamental of Computer Programming Unit:-III

S. No. Topic :-Introduction to the basic concepts of network and data communication.Time Allotted:-

1. IntroductionBasic Network Concepts- Distinguish between a peer-to-peer and server-based network. A computer network is a system for communication among two or more computers. Data communication-Transfer of digital data. digital communication: electronic transmission of information that has been encoded digitally

10

30

5

5

2 Division of the Topic Network Concept of network Peer to peer network Server based network Data communication

3. Conclusion Network is a system through which two or more computer communicated. In data communication there is transfer of data from one computer to another Computer. Covered both topic network and data communication.

4 Question / Answer How data communication takes place?

Assignment to be given:- Nil

Reference Readings:- Commuter Fundamental by P.K.Sinha The c programming language by Dennis M. Ritche, The c programming language by Y.M.Kantkar

Lecture Plan 11

Page 11: Lect Plan Focp

Faclty:-Mr. Akshat Agrawal Semester:- I Class:- IT-B Course Code:- CSE-101-E

Subject:-Fundamental of Computer Programming Unit:-III

S. No.Topic :-How internet works. Major features of internet. Time

Allotted:-

1. IntroductionInternet-networks connect together in many different ways to form the single entity that we know as the Internet. In fact, the very name comes from this idea of interconnected networks.Features of internet-using internet people can be contacted and information can be shared. Windows XP Professional includes Internet Explorer 6, the browser that gives youth freedom to experience the best of the Internet..

10

30

5

5

2 Division of the Topic What is internet How it works Major features of internet

3. ConclusionStudents understood the concept of internet. Internet-networks connect together in many different ways to form the single entity that we know as the Internet. Covered how internet works, major features of internet, and file transfer protocol . Windows includes Internet Explorer , the browser that gives you the freedom to experience the best of the Internet.

4 Question / Answer What is internet and how its works?

Assignment to be given:- Nil

Reference Readings:- Commuter Fundamental by P.K.Sinha The c programming language by Dennis M. Ritche, The c programming language by Y.M.Kantkar

Page 12: Lect Plan Focp

Lecture Plan 12

Faclty:-Mr. Akshat Agrawal Semester:- I Class:- IT-B Course Code:- CSE-101-E

Subject:-Fundamental of Computer Programming Unit:-III

S. No.Topic :-Email, FTP, and using internet. Time

Allotted:-

1. IntroductionInternet-internet is a group of networks..Email-Messages that are sent electronically via computer networksFile Transfer Protocol - a IT-Banism for transferring files from one computer to another, often across a network or via a modem.How to use internet-we can use the new Media Bar to find and play media files in the Internet

10

30

5

5

2 Division of the Topic Email system File transfer protocol How we can use the internet.

3. ConclusionStudents understood the concept of email, how to send email and how to receive an email. Connect together in many different ways to form the single entity that we know as the Internet. Covered successfully file transfer protocol File Transfer Protocol - a IT-Banism for transferring files from one computer to another, often across a network or via a modem.

4 Question / Answer What is FTP.

Assignment to be given:- Nil

Reference Readings:- Commuter Fundamental by P.K.Sinha The c programming language by Dennis M. Ritche, The c programming language by Y.M.Kantkar

Lecture Plan 13

Page 13: Lect Plan Focp

Faclty:-Mr. Akshat Agrawal Semester:- I Class:- IT-B Course Code:- CSE-101-E

Subject:-Fundamental of Computer Programming Unit:-V

S. No.Topic :-C fundamentals, formatted input and output. Time

Allotted:-

1. IntroductionC fundamental-history of c, keywords, variables, constant, c instruction.Formatted outputs-The printf(...) functions in provide formatted output and allow transformations of the arguments.Formatted input- the scanf(…) function provide formatted input and allow transformation. ]Format information must begin with % followed by values for the format followed by a character for the translation (to print % by itself use %%).

10

30

5

5

2 Division of the Topic C fundamental C history C keywords Variables Constant C instruction Formatted input Formatted output

3. ConclusionThe C programming language is a low-level standardized programming language developed in the early 1970s by Ken Thompson and Dennis Ritchie for use on the UNIX operating system. It has since spread to many other operating systems, and is one of the most widely used programming languagesConstant- changeless: persistent in occurrence and unvarying in natureVariable- something that is likely to vary. Covered the topic of formatted input and output.

4 Question / Answer What is formatted input and output? Who develop the c language?

Assignment to be given:- Nil

Reference Readings:- Commuter Fundamental by P.K.Sinha The c programming language by Dennis M. Ritche, The c programming language by Y.M.Kantkar

Lecture Plan 14

Page 14: Lect Plan Focp

Faclty:-Mr. Akshat Agrawal Semester:- I Class:- IT-B Course Code:- CSE-101-E

Subject:-Fundamental of Computer Programming Unit:-V

S. No. Topic :-Expression, selection statements, control statementsTime Allotted:-

1. Introduction

Operators and values are combined to form expressions. The values produced by these expressions can be stored in variables, or used as a part of even larger expressions. There are various selection statements such as- if statement, if-else statement, conditional operator. There are different type of control statements

e.g. switch case ,go to statement

10

30

5

5

2 Division of the Topic What is expression Selection statements If, else if Control statements Switch case go to statement

3. Conclusion In c operator and values are combined to form expression. There are different types Of statements through which it is decided where the control will go. There are controls statements like switch case and go to. This topic covered successfully.

4 Question / Answer Write a program using switch case statement.

Assignment to be given:- Q1-Explain the difference between structure and union in C. Q2.What is an array variable ?How does differ from ordinary variable? Q3.Explain purpose of data type and variable. Q4. What is the need of function ? Write all the necessary steps required to use function.

Reference Readings:- Commuter Fundamental by P.K.Sinha The c programming language by Dennis M. Ritche, The c programming language by Y.M.Kantkar

Lecture Plan 15

Page 15: Lect Plan Focp

Faclty:-Mr. Akshat Agrawal Semester:- I Class:-IT-B Course Code:- CSE-101-E

Subject:-Fundamental of Computer Programming Unit:-V

S. No.Topic :-Loops and their application, basic types, arrays. Time

Allotted:-

1. IntroductionLoops-Most real programs contain some construct that loops within the program, performing repetitive actions on a stream of data or a region of memory. There are several ways to loop in C. Two of the most common are the while loop and for loop.Basic data type-there are four basic data types in C: Booleans, integers, floats and stringArray-Arrays of any type can be formed in C. The syntax is simple:

type name[dim];

10

30

5

5

2 Division of the Topic Loops While Do while For loop Application of loops Basic data type arrays

3. Conclusion Loop is an important characteristic of a programming language. Different loops are Covered such as while, do while, for loop, and their application. Array is a collection of data which are similar.

4 Question / Answer Write a program using do while loop.

Assignment to be given:- Nil

Reference Readings:- Commuter Fundamental by P.K.Sinha The c programming language by Dennis M. Ritche, The c programming language by Y.M.Kantkar

Lecture Plan 16

Page 16: Lect Plan Focp

Faclty:-Mr. Akshat Agrawal Semester:- I Class:- IT-B Course Code:- CSE-101-E

Subject:-Fundamental of Computer Programming Unit:-V

S. No. Topic :-Function, recursive function, program organization.Time Allotted:-

1. IntroductionFunction-C provides functions which are again similar most languages. One difference is that C regards main() as function. Also unlike some languages, such as Pascal, C does not have procedures.Recursive function-function for which the value of the function for any argument Xn+1 is a function of the value of the function for the argument An.Program organization- how to assemble a program.

10

30

5

5

2 Division of the Topic Function Calling a function Call by value Call by reference Recursive function Program organization

3. Conclusion Function is self contained block that perform particular task. Student understood how to call a function by value and by reference. Recursion function is a function which calls itself.

4 Question / Answer Write a program to swap two numbers. (call by reference)

Assignment to be given:- Nil

Reference Readings:- Commuter Fundamental by P.K.Sinha The c programming language by Dennis M. Ritche, The c programming language by Y.M.Kantkar

Lecture Plan 17

Page 17: Lect Plan Focp

Faclty:-Mr. Akshat Agrawal Semester:- I Class:-IT-B Course Code:- CSE-101-E

Subject:- Fundamental of Computer Programming Unit:-V

S. No.Topic :-Local and external variable and their scope , pointer , arrays.

Time Allotted:-

1. IntroductionLocal variable-data item known within a block, but inaccessible to code outside the blockGlobal variable-A symbol defined in one program module that is used in other independently compiled program modulesScope of a variable-The scope of a variable is the context within which it is defined. we declare but not initialize a variable outside a function it should be global in scope, we declare (and optionally initialize) a variable with the var keyword inside a function, even though a global variable of the same name exists outside of the function, then it should be local in scope.Pointer-The C language allows the programmer to ``peek and poke'' directly into memory locations. This gives great flexibility and power to the language.Arrays-Arrays of any type can be formed in C. The syntax is simple:

type name[dim];

10

30

5

5

2 Division of the Topic Local variable Global variable Scope of a variable Pointer arrays

3. Conclusion A variable within a function is local and outside a function is global. Scope of a variable-The scope of a variable is the context within which it is defined. we declare but not initialize a variable outside a function it should be global in scope Pointers are not exclusive to functions, but this seems a good place to Introduce the pointer type.

4 Question / Answer

What is difference between local and global variable?

Assignment to be given:- Nil

Reference Readings:- Commuter Fundamental by P.K.Sinha The c programming language by Dennis M. Ritche, The c programming language by Y.M.Kanitkar

Lecture Plan 18

Page 18: Lect Plan Focp

Faclty:-Mr. Akshat Agrawal Semester:- I Class:-IT-B Course Code:- CSE-101-E

Subject:- Fundamental of Computer Programming Unit:-VI

S. No.Topic :-String literals, string variables, I/O of strings. Time

Allotted:-

1. IntroductionString-C has a character type, but no string type as such. Text is defined as a character array that is as a table of single characters. Char volume[6]; String literals can be enclosed in matching single quotes (') or double quotes ("). They can also be enclosed in matching groups of three single or double quotes.String variable-String variables are able to store any type of text information. Allowable values for a string variable include all numbers and all text charactersI/O of string-sprintf puts formatted data into a string which must have sufficient space allocated to hold it. This can be done by declaring it as an array of char. The data is formatted according to a control string of the same form as that for printf. sscanf takes data from a string and stores it in other variables as specified by the control string. This is done in the same way that scanf reads input data into variables. sscanf is very useful for converting strings into numeric v values.

10

30

5

5

2 Division of the Topic What is string String literal String variable I/O of strings.

3. ConclusionStudent understood concept of string, string literal, string variable, and I/O of stringI/O of string-sprintf puts formatted data into a string which must have sufficient space allocated to hold it. This can be done by declaring it as an array of char.

4 Question / Answer Write a program using putchar and getchar.

Assignment to be given:- Nil

Reference Readings:- Commuter Fundamental by P.K.Sinha The c programming language by Dennis M. Ritche, The c programming language by Y.M.Kanitkar

Lecture Plan 19

Page 19: Lect Plan Focp

Faclty:-Mr. Akshat Agrawal Semester:- I Class:- IT-B Course Code:- CSE-101-E

Subject:-Fundamental of Computer Programming Unit:-VI

S. No.Topic :-Arrays of string, applications, preprocessor directive, macro definition, conditional compilation.

Time Allotted:-

1. IntroductionArrays of string-Our next task is to store and print non-numeric text data, i.e. a sequence of characters which are called strings. A string is a list (or string) of characters stored contiguously with a marker to indicate the end of the string.Application-strlen(),strcat(),strcpy(),strcmp().The Preprocessor accepts source code as input and is responsible for removing comments interpreting special preprocessor directives denoted by #. Macro-An object that contains a symbol, name, or key that represents a list of commands, actions, or keystrokesConditional compilation-Conditional compilation is useful for things like machine-dependencies, debugging, and for setting certain options at compile-time. Beware of conditional compilation. Various controls can easily combine in unforeseen ways

10

30

5

5

2 Division of the Topic Arrays of string Application of strings Strcat(), Strcmp(), Strlen(), Strcpy() Preprocessor directive Macro definition Conditional compilation

3. ConclusionString is an array of character. Arrays of string-Our next task is to store and print non-numeric text data, i.e. a sequence of characters which are called strings.Covered strcat, strcmp, strcpy, strlen function.

4 Question / AnswerWrite a program to reverse a given string.

Assignment to be given:- Nil

Reference Readings:- Commuter Fundamental by P.K.Sinha The c programming language by Dennis M. Ritche, The c programming language by Y.M.Kanitkar

Lecture Plan 20

Page 20: Lect Plan Focp

Faclty:-Mr. Akshat Agrawal Semester:- I Class:-IT-B Course Code:- CSE-101-E

Subject:-Fundamental of Computer Programming Unit:-VI

S. No.Topic :-Structure, union, enumeration structure variable and operation. Time

Allotted:-

1. IntroductionStructure-Structures in C are similar to records in Pascal. For example:

  struct gun {

char name[50];int magazine size;float caliber;};

 struct gun arnies;

A union is a variable which may hold (at different times) objects of different sizes and types. C uses the union statement to create unions, for example: Enumerated types contain a list of constants that can be addressed in integer values We can declare types and variables as follow.   enum days {mon, tues, ..., sun} week;   enum days week1, week2;

10

30

5

5

2 Division of the Topic Structure Union Enumeration structure variable Operation on structure

3. Conclusion Structure is a collection of dissimilar data type. Structures in C are similar to records in Pascal. A union is a variable which may hold (at different times) objects of different sizes and types. Covered the topic enumeration and operation.

4 Question / Answer What is difference between structure and union? What are main operation on structure?

Assignment to be given:- Nil

Reference Readings:- Commuter Fundamental by P.K.Sinha The c programming language by Dennis M. Ritche, The c programming language by Y.M.Kanitkar

Lecture Plan 21

Page 21: Lect Plan Focp

Faclty:-Mr. Akshat Agrawal Semester:- I Class:- IT-B Course Code:- CSE-101-E

Subject:-Fundamental of Computer Programming Unit:-VI

S. No.Topic :-Structure type, nested arrays structure, union-enumeration as integer tags type.

Time Allotted:-

1. IntroductionStructure type- Once the structure is defined, you can declare a structure variable by preceding the variable name by the structure type name. If you've defined the structure with tags both before and after the braces, it's a matter of style whether you declare the variable using the word struct or not.Nested array structure-nested array can be used within structures.union-enumeration as integer tags type- Besides the structure tags and type names that are required to be isomorphic, the merger also tries to coalesce definitions of structures and types with the same name from different file.

10

30

5

5

2 Division of the Topic Structure type Nested arrays structure Union enumeration as integer tag type

3. Conclusion Student understood the structure type- once the structure is defined, you can declare a structure variable by preceding the variable name by the structure type name. Covered the nested array within structure. and union enumeration type.

4 Question / Answer Give a example of nested array structure in .C

Assignment to be given:- Nil

Reference Readings:- Commuter Fundamental by P.K.Sinha The c programming language by Dennis M. Ritche, The c programming language by Y.M.Kanitkar

Lecture Plan 22

Page 22: Lect Plan Focp

Faclty:-Mr. Akshat Agrawal Semester:- I Class:- IT-B Course Code:- CSE-101-E

Subject:-Fundamental of Computer Programming Unit:-VI

S. No. Topic :-Declaration syntax, storage class, type qualifiers, decelerator.Time Allotted:-

1. IntroductionThe declare construct is used for embedding declarations within executable code. Global declarations and declarations that are computed by a program are established by the proclaim constructStorage class- You begin a declaration with an optional storage class keyword, intermixed with zero or more type parts: The storage class keyword is from the set: auto extern register static typedefType qualifier and decelator- storage class and type part of a declaration with a list of declarators separated by commas. Each declarator can specify a name for the entity that you are declaring as well as additional type information write a declarator as, in order:1. zero or more pointer decorations2. an optional name or a declarator in parentheses3. zero or more array decorations or at most one function decorations

10

30

5

5

2 Division of the Topic Declaration syntax Storage class Type qualifier Decelerator

3. Conclusion Syntax is actual representation of variable, constant and identifiers. storage class are where the data or information are stored. Type qualifier and decelator- storage class and type part of a declaration with a list of declarators separated by commas.declarator is used for declare a variable or constant.

4 Question / Answer

Explain the various types of storage class.

Assignment to be given:- Nil

Reference Readings:- Commuter Fundamental by P.K.Sinha The c programming language by Dennis M. Ritche, The c programming language by Y.M.Kanitkar

Page 23: Lect Plan Focp

Lecture Plan 23

Faclty:-Mr. Akshat Agrawal Semester:- I Class:- IT-B Course Code:- CSE-101-E

Subject:-Fundamental of Computer Programming Unit:-VI

S. No.Topic :-Initializer, program design, modules, information. Time

Allotted:-

1. IntroductionInitializer- You can specify an initial value for an object by writing an initializer. You initialize an object with static duration by writing a static initializer You initialize an object with dynamic duration by writing a dynamic initializerProgram design- The Program Design specifies how the HTF LPA will meet all Program requirements set forth in the LPA Program Agreement.Modules- Modules extend the capabilities of Mambo giving the software new functionality. Modules are small content items that can be displayed anywhere that your template allows it to be displayedInformation- message received and understood

10

30

5

5

2 Division of the Topic Initializer Program design Modules Information

3. Conclusion Initializer-You can specify an initial value for an object by writing an initialize program design is the concept how the program will develop, students understood the modules of a program and information.

4 Question / Answer What is initialier? What is information?

Assignment to be given:- Nil

Reference Readings:- Commuter Fundamental by P.K.Sinha The c programming language by Dennis M. Ritche, The c programming language by Y.M.Kanitkar

Lecture Plan 24

Page 24: Lect Plan Focp

Faclty:-Mr. Akshat Agrawal Semester:- I Class:- IT-B Course Code:- CSE-101-E

Subject:-Fundamental of Computer Programming Unit:-VI

S. No.Topic :-Abstract data type, different data type, difference between C and C++, low level programming

Time Allotted:-

1. Introduction Abstract data type-A type whose implementation details are hidden and can only be handled using the publicly accessible operations provided for it. Not to be confused with abstract type.Data type-The properties and internal representation that characterize datadifference between C and C++: C is a general programming language. C++ is an Object Oriented variant of C.Low level programming- a low-level language corresponds closely to machine code, so that a single low-level language instruction translates to a single machine-language instruction

10

30

5

5

2 Division of the Topic Abstract data type Data types Difference between c and c++ Low level programming

3. Conclusion Abstract data type covered successfully. Data type-The properties and internal representation that characterize data. Students understood the difference between C and C++. Low level programming- a low-level language corresponds closely to machine code.

4 Question / Answer

Give main differences between the C and C++.

Assignment to be given:- Nil

Reference Readings:- Commuter Fundamental by P.K.Sinha The c programming language by Dennis M. Ritche, The c programming language by Y.M.Kanitkar

Page 25: Lect Plan Focp

Lecture Plan 25

Faclty:-Mr. Akshat Agrawal Semester:- I Class:- IT-B Course Code:- CSE-101-E

Subject:-Fundamental of Computer Programming Unit:-VI

S. No.Topic :Bitwise operation, bit fields, instructions, other low level language Time

Allotted:-

1. Introduction Bitwise operation- In Fundamental of Computer Programming, a bitwise operation operates on one or two bit patterns or binary numerals at the level of their individual bits. On many computers, bitwise operations are faster than normal arithmetic operationsBit fields- Bit Fields allow the packing of data in a structure. This is especially useful when memory or data storage is at a premium.instruction-direction: a message describing how something is to be done; he gave directions faster than she could follow them.Low level programming-Absolute Machine Code, Assembly Language, Compiler Language, Interpreter Language

10

30

5

5

2 Division of the Topic Bitwise operation, Bit fields, Instruction, Low level programming.

3. Conclusion

Student understood the bitwise operation, bit fields, and various instructions in c language, some other level language.

4 Question / Answer

What are different types of bitwise operation.? What are different types instruction?

Assignment to be given:- Nil

Reference Readings:- Commuter Fundamental by P.K.Sinha The c programming language by Dennis M. Ritche, The c programming language by Y.M.Kanitkar

Page 26: Lect Plan Focp

Lecture Plan 26

Faclty:-Mr. Akshat Agrawal Semester:- I Class:-IT-B Course Code:- CSE-101-E

Subject:-Fundamental of Computer Programming Unit:-II

S. No.Topic :-User interface, running programs, managing files. Time

Allotted:-

1. IntroductionUser interface-The hardware and operating software by which a receiver operator executes procedures on equipment and the means by which the equipment conveys information to the person using it: the controls and displays.Running programs-You will usually want to run long programs in the background, rather than have them occupying a window, and keeping you logged in.Managing file-file can be managed using indexed file system, sequential, hash file system.

10

30

5

5

2 Division of the Topic User interface How to run a program in best efficient manner. How to manage file.

3. Conclusion User interface is intermediation between hardware and software.Covered the topic how the programs are run on operating system, and manage the files.

4 Question / Answer

What is user interface?

Assignment to be given:- Nil

Reference Readings:- Commuter Fundamental by P.K.Sinha The c programming language by Dennis M. Ritche, The c programming language by Y.M.Kanitkar

Page 27: Lect Plan Focp

Lecture Plan 27Faclty:-Mr. Akshat Agrawal Semester:- I Class:- IT-B Course Code:- CSE-101-E

Subject:-Fundamental of Computer Programming Unit:-II

S. No.Topic :-Introduction to PC operating system, Unix/Linux, DOS,Window 2000 Time

Allotted:-

1. IntroductionOperating system-the most important program that runs on a computer. Every general-purpose computer must have an operating system to run other programs. Operating systems perform basic tasks, such as recognizing input from the keyboard, sending output to the display screen, keeping track of files and directories on the disk, and controlling peripheral devices such as disk drives and printers.Unix-UNIX was originally developed at Bell Laboratories as a private research project by a small group of people.Linux-is a free Unix-type operating system originally created by Linus Torvalds with the assistance of developers around the worldDos-Program used to transfer information to and from a disk. Often referred to as DOSWindow2000- A. Windows 2000 is the next major release of NT. New X.500-style directory services called Active Directory. In the active Directory, domain controllers store the entire directory database for their domain

10

30

5

5

2 Division of the Topic Operating system Pc operating system Unix operating system Linux operating system Dos Windows

3. ConclusionOperating system is the interface between the computer hardware and user of computer. Student understood the concept of pc operating system and Unix /Linux. Dos is disk operating system while window is graphical user interface.

4 Question / Answer What is operating system? What is difference between Unix and Linux? What is difference between Dos and Windows?

Assignment to be given:- Nil

Reference Readings:- Commuter Fundamental by P.K.Sinha The c programming language by Dennis M. Ritche, The c programming language by Y.M.Kanitkar

Page 28: Lect Plan Focp

Lecture Plan 28

Faclty:-Mr. Akshat Agrawal Semester:- I Class:- IT-B Course Code:- CSE-101-E

Subject:-Fundamental of Computer Programming Unit:-VII

S. No. Topic:-Input/output streams, file operating , formatted I/O, character I/O, line I/O

Time Allotted:-

1. Introduction Input/output streams- An iostream object is a source and/or a destination for bytes. The two most important I/O stream classes, both derived from iostream, are fstream and strstream.File operation- files are the most common form of a stream. the first thing we must do is open a file. The function fopen() does this:   FILE *fopen(char *name, char *mode) Formatted I/O- Formatted output-The printf(...) functions in provide formatted output and allow transformations of the arguments.Formatted input- the scanf(…) function provide formatted input and allow transformation. Character I/O- The getchar function reads the next character from the standard input; getc(fp) reads the next character from the stream fp and putchar is used for output.Line I/O- Where we are not too interested in the format of our data, or perhaps we cannot predict its format in advance, we can read and write whole lines as character strings by gets and puts.

10

30

5

5

2 Division of the Topic Input output streams File operating Formatted input output Character input output Line input output

3. ConclusionStudents understood input output streams- An iostream object is a source and/or a destination for bytes. For formatted output printf is used and for formatted input scanf is used. For character input getchar and output putchar are used. for line I/O gets and puts are used.

4 Question / Answer How input and output are formatted? What is line input and output?

Assignment to be given:- Nil

Reference Readings:- Commuter Fundamental by P.K.Sinha The c programming language by Dennis M. Ritche, The c programming language by Y.M.Kanitkar

Page 29: Lect Plan Focp

Lecture Plan 29

Faclty:-Mr. Akshat Agrawal Semester:- I Class:- IT-B Course Code:- CSE-101-E

Subject:-Fundamental of Computer Programming Unit:-VII

S. No.Topic:-Block, string I/O, library support for number and character data, error handling.

Time Allotted:-

1. IntroductionBlock-block is a smallest part of a program.String I/O- When the input stream scanf(), gets(), is used space characters, new line etc. are used as separators and terminators. A string is output by sending it to an output stream using printf(), and puts().Support library- A C program can call on a large number of functions from the Standard C library. It his document is intended as a comprehensive reference for the Standard C programming language, including its support library.Error handling- Error handling is an important issue in embedded systems, and it can account for a substantial portion of a project's code

10

30

5

5

2 Division of the Topic Definition of block String input output Library support for number and character data Error handling.

3. Conclusion Successfully covered the topic on block, string I/O. Support library- A C program can call on a large number of functions from the Standard C library. Error handling is a process of handling programs when unavoidable error occurred.

4 Question / Answer

Give an example of error handling in C. What is a block?

Assignment to be given:- NilReference Readings:- Commuter Fundamental by P.K.Sinha The c programming language by Dennis M. Ritche, The c programming language by Y.M.Kanitkar