Tuesday, January 8, 2013

Text book for SYBCom - Sem 4 - Computer Programming (University of Mumbai)

My latest book for SYBCom - Sem 4, 
Published by Sheth Publishers (December 2012)

ISBN 978-93-82429-71-5

Sunday, November 4, 2012

Linux Question Bank

1.  Explain the grep command used for searching a pattern with any 4 options.
2.. How to start and stop OpenSSH?
3. Discuss the privileges of Linux administrator.
4. Explain the standard file descriptors with suitable commands.
5. Describe the following commands: chown, chmod, expr.
6. Explain the cut command.
7. Write a note on commands for disk space management in linux.
8. Write a shell script to accept a filename. Check if the file exists and display the number of lines, words, and characters in the file. Display an appropriate message if the file is not present.
9. Explain the pipe feature in Unix with examples.
10. Write a note on the contents of the etc/passwd file.
11. Explain sort command with any three parameters.
12. What is the role of linux kernel in linux OS?
13. Explain the system memory management function in Linux.
14. What is a boot loader? Write a note on Grub or LILO.
15. Which commands are used for creating and maintaining user accounts in Linux? Explain with examples.
16  What are the duties of a system administrator?
17. What is meant by "monitoring and tuning performance" of a linux system?
18. Explain the following commands with examples: ls, rm, cp, mv, chown, chmod.
19. Which are the different file systems supported by Linux? Which feature of Linux makes this support possible (Virtual File Systems Layer)?
20. What are memory and virtual file systems? Explain any three (CRAMFS, RAMFS, PROC).
21. Write a short note on linux file permissions.
22. What is meant by Linux disk management? How can the user see the current file system and disk partitioning details on a Linux system? (fstab)
23. Write a note on system shell configuration scripts. What purpose do they serve? Explain the following: BASHRC, CSH, CSHRC.
24. What are CRON files?
25. What is the SYSLOG.CONF file?
26. Write a short note on Network File System. What are its advantages? What are its disadvantages?

TCP/IP Networking
1. Is IP address of a device the same as its MAC address? What are the differences between these two addresses?
2. What are network classes? State their IP number range. Explain the role of router.
3. Explain how a network interface card (NIC) is setup on a Linux system. Explain the ifconfig command.
4. Explain the purpose of the following files: /etc/hosts.conf,  /etc/hosts,  /etc/resolv.conf
5. How are IP addresses extended through subnetting?
6. Explain the Dynamic Host Configuration Protocol (DHCP).

Connecting to Microsoft Systems
1. How can computer systems using Windows operating system communicate with Linux systems? Explain the role of Samba in this process.
2. How is Samba installed on a Linux system?
3. What is SMB? Which OS uses this?

Internet Services:
1. What is an Internet Service? Name 5 commonly used services.
2. Write a note on ssh (secure shell), scp (secure copy) and sftp (Secure File Transfer Program).
3. Write a note on telnet, ftp, rsync, and rsh. Why are these services called insecure services?
4. Write a short note on finger, talk and ntalk. Are these services secure or unsecure?
5. Which are the common server protocols available on Linux?
6. Write a note on xinetd. How is it different from inetd?

Domain Name System
1. What is DNS? Why is it necessary? What are top level domains? Give 3 examples of TLDs.
2. What are the different types of domain name servers?
3. Explain the following terms: mail user agent, mail transfer agent, and local delivery agent.
4. Write a short note on SMTP, POP3, and IMAP4.
5. What steps can be taken to maintain email security?

Configuring a Web Server
1. State the features of  Apache  web server.
2. Explain how web servers work.
3. What is SSI? What are the advantages of using SSI? How is SSI enabled on Apache web server?
4. What is a secure web server? What are its components? Which packages are needed to create a secure web server?

Thursday, October 4, 2012

Building a Modern Computer from First Principles

The official companion web site of Nand2Tetris courses

And of the book The Elements of Computing Systems, MIT Press, By Noam Nisan and Shimon Schocken
The site contains all the software tools and project materials necessary to build a general-purpose computer system from the ground up. We also provide a set of lectures designed to support a typical course on the subject.
The materials are aimed at students, instructors, and self-learners. Everything is free and open-source; as long as you operate in a non-profit educational setting, you are welcome to modify and use our materials as you see fit.

Learn FOSS at almost no cost, at your pace, at your place! 

Earn knowledge, earn certificate and earn honorarium too...
Department of Computer Science, University of Mumbai takes pride in continuing with the very
successful launch of the training programme in the following Free and Open Source Software:
Pk1. UBUNTU – World’s famous and efficient operating system
Pk2. Python – Latest choice of the programmers in Industry and research
. Scilab—Compatible with the proprietary Matlab
. MySQL—PHP – World’s most popular database and Scripting language
. LaTeX—A better option to MS Word when you are creating scientific literature
. Libreoffice—FOSS alternative to Microsoft office


Wednesday, September 19, 2012

TYBSc Computer Science - Software Engineering

1. State the activities of project management process and explain them in brief. How are these activities grouped? (Oct 2012-Mumbai University)
2. Explain the concept of LOC with example. How is it useful in estimation process?
3. What is risk management? Explain the activities involved.
4. State the principles of software testing. Explain any two.
5. State the tools used in project scheduling and explain them in brief.
6. Explain the stages in static testing.
7. Explain white box testing technique.
8. 'Estimation using use-case is problematic'. Explain this statement.
9. What is cyclomatic complexity? Give one example.
10. Explain the terms error seeding and test plan.
11. Discuss the advantages and disadvantages of blackbox testing.
12. How the results of Testcase execution and analysis are useful?
13. Explain the concept of basis paths in white box testing.
14. Explain bottom-up integration testing.
15. Write a short note on random testing.
16 What is the use of charts like Gantt and PERT/CPM (Oct 2012-Mumbai University)
17 State metrics from CK metrics suite. Explain two of them. (Oct 2012-Mumbai University)
18 Explain principles of Agile development (Oct 2012-Mumbai University)

My book for TYBCom - containing C, Word, Excel, FoxPro and published in 2000.

My book for SYBCom Computer Programming - 2012

TYBSc - Operating Systems - Important Questions

1. Write short notes on: starvation, preemptive process scheduling.
2. Explain the concept of virtual memory using simple paging technique.
3. Describe the activities of the process management module of an operating system.
4. Write a note on  services provided by an OS.
5. Define multiprogramming. Explain how multiprogramming increases CPU utilization.
6. Explain how mutual exclusion is implemented using a semaphore.
7. What are the benefits of multiprogramming? Bring out any two differences between a thread and a process.
8. Write a note on functions of a scheduler.
9. Explain thrashing, its causes and effects.
10. Describe Scan and C_Scan disk scheduling techniques.
11. Explain the direct memory access method of performing I/O.
12. Explain demand paging .
13. Write a short note on Unix architecture.
14. Explain awk editor with any three keywords used to edit a file.
15. What are shell metacharacters? Explain with an example.
16. Explain grep command with any four options.
17. What is paging? Explain the basic method used for paging.
18. Define the terms worm, virus and DOS.
19. What is monitor? Explain its usage.
20. Define a thread. Explain the three common ways of establishing the relation between user level and kernel level thread.
21. Describe the conditions for which deadlock situation occurs.
22. Explain the various operations that can be performed on a directory.
23. Explain any four OS services.
24. Explain the need for context switching.
25. Discuss Peterson's algorithm.
26. Write a short note on types of system calls.
27. Write short note on safe and unsafe states.
28. Explain round-robin scheduling algorithm. Use an appropriate example.
29. Describe the produce-consumer (Bounded buffer) problem and write the semaphore based algorithm for the same. Explain the steps of the algorithm and assumptions made in the algorithm.
30. For the following page reference string  9,0,1,0 8,1,8,7,8,7, 1,2,8,2, 7,8,2,3,8,3  determine the number of page faults for the given page replacements algorithms with 3 frames :
(i) OPT (optimal)
(it FIFO
(iit LRU

31. Consider the following set of processes, with the length of the CPU burst time given in milliseconds :
Process     Burst Time
P1                9
P2              10
P3              12
P4                8
P5              13

All five processes arrive at time O, in the order given. Draw Gantt charts illustrating the execution of the processes using FCFS, SIF and RR (quantum=l) scheduling. What is the turnaround time of each process for each of the scheduling algorithms ? Also find the average waiting time for each algorithm.

TYBSc Computer Science and IT - ASP.Net - Important Questions

1. List and explain the various primitive data types used in .Net.
2. Write a short note on metadata.
3. What are the highlights of .Net framework?
4. Give an overview of CLR.
5. What is MSIL? What is PE file?
6. What do you mean by value type and reference type?
7. What is an assembly? Explain structure assembly diagrammatically.
8. List and describe the objectives of .Net framework.
9. Explain the types of applications that are built with .Net.
10. Describe CLS. Explain the term "cross language operability".

TYBSc Computer Science - DBMS and RDBMS

1. State and explain briefly the ACID properties.
2. Write a note on serializability.
3. What do you understand by transactions and schedules? State the different types of errors arising due to interleaving transactions.
4. What is a transaction? Why does a DBMS interleave the actions of different transactions instead of executing transactions one after the other?
5. What must a user guarantee with respect to a transaction and database consistency? What should a DBMS guarantee with respect to concurrent execution of several transactions and database consistency?
6. Explain the strict two-phase locking protocol.
7.Explain the following terms briefly:  (a) attribute,  (b) domain,  (c) entity,  (d) relationship, (e) entity set, (f) relationship set, (g) one-to-many relationship, (i) many-to-many relationship, (j) participation constraint, (k) overlap constraint, (l) weak entity set, (m) aggregation, and (n) role indicator
8.Define these terms: atomicity, consistency, isolation, durability, schedule, blind write, dirty read, unrepeatable read, serializable schedule, recoverable schedule, avoids-cascading-aborts schedule.
9. What is a system catalog? What information is stored in system catalog? OR What is a data dictionary or catalog table?
10. Describe three techniques commonly used when developing algorithms for relational operators. Explain how these techniques can be used to design algorithms for the selection, projection, and join operators.  OR  Explain the evaluation algorithms for relational operators of selection, projection and join.
11. What is the goal of query optimization? Why is optimization important?
12. What is a transaction? In what ways is it different from an ordinary program (such as a C program)?
13. Explain the general forma of loops in PL/SQL.
14. State and explain cursor attributes (PL/SQL).
15. State the properties of decomposition. Explain any one.
16. What does the lock manager do? Explain the types of locks offered by the lock manager.
17. Explain the functioning in Redo plan in ARIES.
18. Write a short note on deadlocks.
19. What is closure set of functional dependency?
20. Explain FDs in third normal form.
21. What is transaction in Oracle? Explain transaction management commands in SQL.
22. With respect to schedule, define the terms: conflict equivalent, and conflict serializable.
23. State the different relational operators and explain any two.
24 Explain the concept of transaction and schedule with examples. (Oct 2012-Mumbai University)
25 Write in brief about analysis phase of ARIES (Oct 2012-Mumbai University)
26 What is the need for decomposition? Explain lossless property of decomposition. (Oct 2012-Mumbai  University)

TYBSc Computer Science - Paper IV - Software Engineering

1.       Write a short on testing strategy
2.       Write a short on six sigma
3.       What is the difference between stress & volume testing
4.       Explain equivalence partitioning.
5.       Explain Cause & Effect graphing with example.
6.       What are the contents of test case specification document?
7.       What is the need of s/w metrics?
8.       What are differences between LOC & FP estimation?
9.       Explain the steps involved in Project Scheduling.
10.     What are the components of PERT/CPM charts?
11.     What are the components of GANT chart?
12.     What is ARIES algorithm? Advantages, Explain 3 steps in ARIES?
13.     Write about COCOMO model in detail.

TYBSc IT - ASP.Net and C#

1. Write a note on significance of metadata.
2. Give the advantages of web controls.
3. What is a web service?
4. Explain different types of assemblies.
5. Write a short note on CLR.
6. Enlist the different goals of .Net.
7. Diagrammatically explain the .Net architecture.
8. How are different languages integrated under .Net?
9. Write a short note on metadata. What is PE file?

TYBSc Computer Science - Paper II - Advanced Java - Important Questions

1. What is a servlet? What are the various types of servlets? Explain  the lifecycle of a servlet.
2. What is the role of HttpServletRequest and ServletContext? Explain some important methods of these classes.
3. What is EJB? Explain various types of EJB.
4. Differentiate between cookies and sessions.
5. How is a JSP file executed by a web server?
6. Describe the lifecycle of a JSP page.
7. Differentiate between stateless and stateful session beans.
8. Write a note on Type-1 driver.
9. Explain the use of JCheckBox and JTable. Giv examples.
10. Explain the role of Action interface.
11. Write a note on JTabbedPane? How is it created?
12. Explain the following functions - run(), sleep() and wait(). Give suitable examples.
13. Explain the steps to use JDBC.
14. Explain different ways  of session tracking in servlets.
15. Explain gridlayout with an example.
16. Explain the following classes: DriverManager and GenericServlet.
17. Write a JDBC program that accepts a table name and displays the total number of records present in it.
18. How are JavaBeans accessed in JSP?
19. Differentiate between GET and POST request.
20. State the differences between cookie and HttpSession.
21. Write a note on Java archive files.
22. What is persistence in the context of Java Beans?
23. What is design pattern? Explain design patterns for simple and boolean properties.
24. What is JavaBeans? What are the advantages of creating JavaBeans?
25. Write a note on RMI Architecture
26. Explain DriverManager Class and its Methods.
27. Write a short note on the following:
       a.       ResultSet
       b.      ResultSetMetaData
28. Discuss the “synchronization“  issues in servlets.
29. Explain Session Tracking in Servlet? What are the two ways of session tracking in servlet?
30. Explain the Java Servlet Architecture.
31. Explain in detail Introspection feature of Java Beans.
32  Explain Bound property of Java Beans with example.
33  Explain Constrained property of a Bean giving example.
34 What is a Java Bean? What are the advantages of using Java Beans?
35 What is a JAR file? What are the options available with the JAR files? List any five.
36 Explain Java Server Pages (JSP). What are the advantages using JSP over Servlets?
37 What are the various JSP tags available?
38 Explain JSP Access Models and Session Management using JSP.
39 Describe various Implicit objects of the JSP. What is the scope of those objects?
40 What are the major differences in comparison between JSP and ASP?
41 Write a note on JColorChooser class. (Oct 2012-MU)
42 Write a note on RMI Registry service (Oct 2012-MU)
43 What factors should be considered before giving local or remote access to beans? (Oct 2012-MU)
44 Write a web service method that accepts a number n and returns the value of 1+2+3...+n (Oct 2012-MU)

TYBSc Computer Science - Paper I - Data Communications and Networking - Important Questions

1. Differentiate between periodic and aperiodic signals.
2. How can transmissions be impaired? What ate the different types of transmission impairments?
3. What is multiplexing? When is multiplexing useful?
4. Describe the characteristics of ring / bus / mesh topology.
5. What is CSMA/CD?
6. Explain the synchronous and asynchronous modes of transmission.
7. Describe line configuration with suitable example.
8. Explain statistical TDM.
9. Differentiate between baseband and broadband transmissions.
10. What is meant by cyrptography? Explain affice cipher.
11. Highlight the differences between OSI and TCP/IP models.
12. Discuss the functions of the following layers of the OSI model: Network layer, transport layer.
13. What is the function of SMTP? What is the difference between the user agent (UA) and mail transfer agent (MTA)?
14. Explain the term media access control.
15. Describe the characteristics of start topology.
16. Describe the time domain view of signal propagation.
17. Explain the relation between data rate and bandwidth.
18. Explain FDM with suitable diagram.
19. What is a  bridge? What functions does it perform?
20. Describe the OSI model and indicate the functions performed by each layer.
21. Differentiate between circuit switching and packet switching.
22. Write a note on polling controlled access.
23. Write a shortnote on bluetooth.
24. Write a short note on coaxial cable and fibre optic cable.
25. Describe the terms 'sliding window' and 'piggy backing'.
26. What is UDP? Explain the UDP packet frame format.
27. What is a firewall/ Sate the design goals of firewall. What are the limitations of firewall?
28. What i a digital signature? Explain its working. Give two examples where digital signatures are used nowadays.
29. Explain the working of DES.
30. Explain the role of DHCP.
31. What are the advantages of IPv6?
32. What is authentication? Explain the reasons for authentication failure.
33. Explain cipher text, caesar cipher and Verman cipher techniques.
34. What is encryption and decryption of messages? Explain in detail. What is their importance in transmitting information over the Internet?
35. What is meant by public key and private key in cryptography? Why are two keys required to pass information?
36. What is meant by plain text and cipher text? What are the possible methods to convert plain text into cipher text?
37. What is meant by brute force attack? Explain its concept with the example of D-Hellman key exchange algorithm.
38. Distinguish between unipolar encoding and polar encoding. Explain NRZ and Manchester encoding.
39. Explain the terms data rate and error rate. State Shannon's formula for maximum channel capacity and explain how the terms in the formula affect the actual data rate.
40. Explain RIP.
41. What is congestion? What do you mean by open-loop congestion control? Explain any two types of open-loop congestion control.
42. What is HDLC? State the different types of frames of HDLC.
43. State and explain the various classes in classful addressing.
44. Explain any three network connectivity devices.
45. Explain the method of checksum error detection.
46. Explain the different types of DNS servers and explain their role.
47. Write a note on symmetric key encryption.

Saturday, May 12, 2012

TYBSc IT Mumbai University, New Syllabus wef 2012-13

Sem 5:
1. ASP.Net with C#
2. Linux Administration
3. Network Security
4. Software Testing
5. Adv. Java

Sem 6:
1. Data Warehousing
2. Digital Signals and Systems
3. Geographic Information Systems (GIS) (Elective)
4. Internet Technologies
5. IPR and Cyber Laws
6. Project Management

Wednesday, March 14, 2012

SYBSc IT New syllabus w.e.f. 2011-12 can be downloaded from Mumbai University web site: http://www.mu.ac.in/ug147.pdf

Monday, June 6, 2011

FYBSc Computer Science - Revised Syllabus w.e.f. 2008-09

 Revised syllabus for F.Y.BSc. Computer Science to be implemented from 2008-2009

Proposed syllabus and examination scheme for F.Y.B.Sc.
Computer Science (Theory and Practical) from Academic year
2008-09Conduct of CourseThe workload per paper for theory and practical
workload per batch, batch size for practical and passing standards will
be as per the existing norms / regulations and University Guidelines.

Examination Scheme

Theory ( Examination duration per paper 2 hours )




Maximum Marks

Maximum Marks after conversion

Paper I

Computer organization:

Introduction to microprocessors and computer architecture

First Term

Second Term





Paper II

Algorithms and

Programming in C

First Term

Second Term





Practical ( Examination duration per paper 3 hours )

Paper I

Computer organization:

Introduction to microprocessors and computer architecture

Annual Actual Practical



Paper II

Algorithms and

Programming in C

Annual Actual Practical



Certified Journal

Paper I and Paper II









Evaluation Scheme (For Paper I & Paper II) (As per the recommendations passed by the Science Faculty)


Maximum Marks

Maximum marks after conversion

Paper I

Paper II

Paper I

Paper II

First Term





Second Term















Paper Pattern (For Paper I and Paper II) (All questions are compulsory)


Term I

Term II

Maximum Marks*


Based on Unit 1, 2 & 3

Based on Unit 4, 5 & 6



Based on Unit 1

Based on Unit 4



Based on Unit 2

Based on Unit 5



Based on Unit 3

Based on Unit 6




*In each question; maximum marks with options should be set for 22 or 23 marks with internal options.


General Guidelines

  • Each paper is divided into six equal units. First 3 units of each paper are expected to be taught during first term and next 3 units are expected to be taught during second term. The lectures allocated for the respected units are suggestive.
  • Minimum 75 % experiments from each paper are required to be completed and written in the journal.

Syllabus Paper I

Computer organizationIntroduction to microprocessors and computer architectureTheory

Section I

Unit I:  (15 Lectures)           

Introduction :

Computers: History of computers and their classification

Basics of modern computer systems: View of a computer as an integrated system, Neumann machine, block diagram of a computer system.

Information -
Definition, Characteristics and interpretation, Data and its logical
and physical concepts, binary form of program and instruction.

Number Systems – Binary, Decimal, Octal, Hexadecimal and their inter-conversions.

Computer Arithmetic
Binary addition and subtraction using signed-Magnitude, 1’s complement
and 2’s complement, Binary multiplication and division, Floating point
representation and arithmetic, arithmetic through stacks.

Codes for character representation – hexadecimal, BCD, Excess-3, Gray code, ASCII, EBCDIC, Unicode.


1) Computer organization and architecture:
William Stallings, PHI, Sixth edition

2) Computer System architecture:
M. Morris Mano,  PHI,   edition

Unit II: (15 lectures)

 Digital logic circuits:

Boolean algebra – Basic identities of
Boolean Algebra, Boolean function
operations and their truth table, Minimization of gates by K-maps.

Digital Circuits – Half Adder, Full Adder, Binary adder-subtractor, binary incrementer, Multiplexers, Encoder and decoder

Flip Flops – Concept
of sequential circuits, concept of clock and synchronization, S-R, J-K,
Preset and Clear, Master-Slave J-K, D, T Flip Flops, their truth
tables and identities, Conversion from one type to another type of Flip
Flop, concept of counters and registers, shift registers.

Ref: 1) Computer System architecture: M. Morris Mano
PHI,   edition

Unit III: (15 lectures)

 Introduction to computer components:

Memory – 

Primary Memory – RAM, SRAM, DRAM, ROM, EPROM.

Secondary  Memory – Magnetic Floppy and Hard Disk.

Optical Memory – CDROM, WORM.

Concept of Virtual Memory

Concept of Cache and their need.

Memory hierarchy.

Input/output devices

Input/output devices, input/output interface, asynchronous data transfer, modes of data transfer..


Functions of CPU, register
classification and organization, instruction sets and examples of
instruction set, addressing schemes, instruction formats, instruction
cycle and instruction pipelining.


1) Computer organization and architecture:
William Stallings, PHI, Sixth edition

2)  Computer System architecture:
M. Morris Mano, PHI,   edition

Section II

Unit IV: (15 lectures)

 Internal memory organization: DRAM, SRAM, ROM types, Cache Memory Principles, elements of cache design, Pentium 4 cache.

External Memory organization:
Magnetic disk, RAID, Optical memory, Magnetic tape

Input/Output device organization:

External devices, I/O modules, Concepts of programmed I/O, interrupt Drive I/O, DMA, I/O processors.


1) Computer organization and architecture:
William Stallings, PHI, Sixth edition

2)  Computer System architecture:
M. Morris Mano,  PHI,   edition

Unit V: (15 lectures)

 Operating System Support: Basic Concepts, Batch, Multiprogramming and Time-Sharing, scheduling, scheduling, Memory Management.

Introduction to multiprocessors: Characteristics of Multiprocessors, Time-Shared Bus, Multi-port memory. 

Unit VI:  (15 lectures)

Introduction and programming with Microprocessors:
Introduction to 8085 Architecture and its extension to
architecture to 8086,  functional block diagram, Bus interface
unit, Execution unit, general purpose registers, segment registers,
pointers and index registers basic instruction set and organization of
8086,. 8086 Assembly language programming.


1. Microprocessor architecture, programming and applications with 8085:
Ramesh Gaonkar, Fourth edition, Penram international.

2.  Introduction to 8086 programming: 

Practical Section I

  • Introduction to Operating system desktop, folders, files, shortcuts, popular menus, using notepad, word, excel, power point.
  • Introduction to windows wildcard characters, absolute path, relative path and commands like md, cd, rd, copy, ren, del etc.
  • Demo practical on various internal and external parts of computer and their interconnection/working.
  • Demo hands on assembly of PC.
  • Study of basic gates.
  • Implementation of Boolean equations using basic gates.
  • Study of flip-flops.
  • Study of 4 to 1 multiplexer.
  • Study of decoder
  • Study of counters.
  • Study of universal shift registers.
  •  Study of 4 bit adder/subtractor.


:1) Practical A and B are compulsory. They are to be
written in journal but should not be the part of practical examination.

2) Eight practical from the list should be performed.

Section II

  • Demo practical on working of 8085.
  • Study of internal memory, I/O modules.
  • Study of operating system.
  • Study of networking of computers and other devices.
  • Study of concepts of parallel processing.
  • Study of 8086 architecture.
  • Study of 8086 instruction set
  • Writing programs with 8086 microprocessor for
    • Addition of 1 to n numbers
    • Finding largest/smallest from n given numbers.
  • Writing program with 8086 microprocessor for demonstration of use of JUMP instructions.
  •  Writing programs with 8086 microprocessor for
    • Use of I/O ports.
    • Block transfer of memory.


1) Any five experiments from 1 to 7 practical should be performed.

2) Experiments from 8 to10 are compulsory.

Paper II

Algorithms and Programming in CTheory

Section I

Unit I: Introduction to algoritms and c (15 Lectures)

Fundamentals of algorithms: Notion of an algorithm. Pseudo-code conventions like assignment statements and basic control structures.

Algorithmic problems: Develop fundamental algorithms for

(i) Exchange the values of two variables with and without temporary variable,

(ii) Counting positive numbers from a set of integers,

(iii) Summation of set of numbers,

(iv) Reversing the digits of an integer,

(v) Find smallest positive divisor of an integer other then 1,

(vi) Find G.C.D. and L.C.M. of two as well as three positive integers,

(vii) Generating prime numbers.

Analysis of algorithms: Running time of an algorithm, worst and average case analysis.

Different approaches in programming: Procedural approach, Object Oriented approach, Event Driven approach.

Structure of C: Header and body, Use of comments, Compilation of a program.

Data Concepts:  Variables,
Constants, data types like: int, float char, double and void.
Qualifiers: short and long size qualifiers, signed and
unsigned qualifiers. Declaring variables. Scope of the variables
according to block. Hierarchy of data types.

Unit II: Basics OF C (15 Lectures)

Types of operators: Arithmetic,
Relational, Logical, Compound Assignment, Increment and decrement,
Conditional or ternary, Bitwise and Comma operators. Precedence and
order of evaluation. Statements and Expressions.

Type conversions: Automatic and Explicit type conversion.

Data Input and Output functions: Formatted
I/O: printf(), scanf(). Character I/O format: getch(), getche(),
getchar(), getc(), gets(), putchar(), putc(), puts().

Iterations: Control statements for decision making:

(i) Branching: if statement, else.. if statement, switch statement.

(ii) Looping: while loop, do.. while, for loop.

(iii) Jump statements:  break, continue and goto. 

Unit III: Arrays, strings and sorting techniques (15 Lectures)

Arrays: (One and multidimensional), declaring array variables, initialization of arrays,
accessing array elements.

Strings: Declaring and initializing String variables. Character and string handling functions.

Sorting Algorithms: Bubble, Selection, Insertion and Merge sort, Efficiency of algorithms, Implement using C.

Section II

Unit IV: Functions, structures, recursion and union (15 Lectures)

Functions: Global and local
variables, Function definition, return statement, Calling a function by
value, Macros in C, Difference between functions and macros.

Storage classes: Automatic variables, External variables, Static variables, Register variables.

Recursion: Definition, Recursion functions algorithms for factorial, Fibonacci sequence, Tower of Hanoi. Implement using C.

Structure: Declaration of structure,
reading and assignment of structure variables, Array of structures,
arrays within structures, structures within structures, structures and

Unions:  Defining and working with union.

Unit V: Pointers and file handling (15 Lectures)

Pointer: Fundamentals, Pointer
variables, Referencing and de-referencing, Pointer Arithmetic, Chain
of pointers, Pointers and Arrays, Pointers and Strings, Array of
Pointers, Pointers as function arguments, Functions returning pointers,
Pointer to function, Pointer to structure, Pointers within structure.

File handling: Different types of
files like text and binary, Different types of functioms:fopen(),
fclose(), fgetc(), fputc(), fgets(), fputs(), fscanf(), fprintf(),
getw(), putw(), fread(), fwrite(), fseek()

Dynamic Memory Allocation: malloc(), calloc(), realloc(), free() and sizeof operator, 

Unit VI: Link lists, stacks and queues (15 Lectures)

Linear Link lists: Representation of
link list in memory, Algorithms for traversing a link list, searching a
particular node in a link list, insertion into link list (insertion at
the beginning of a node, insertion after a given node), deletion from a
link list. Implement using C.

Stacks: Definition, Array
representation of stacks, Algorithms for basic operators to add and
delete an element from the stack, Implement using C.

Queues: Representation of queue, Algorithm for insertion and deletion of an element in a queue, Implement using C.

Recommended Books:

(1)Introduction to Algorithms (Second Edition): Cormen, Leiserson, Rivest, Stein, PHI( Chapter 1,2,3,10)

(2) Data Structures ( Schaum’s outline series in computers): Seymour Lipschutz McGraw-Hill book Company (Chapter 2, 5, 6, 9)

(3) Programming in ANSI  C(Third Edition) : E Balagurusamy TMH (Chapters: 2, 3, ,4, 5, 6, 7, 8, 9, 10, 11, 12, 13)

Additional References:

(1) Fundamental Algorithms (Art of Computer Programming Vol 1 ): Knuth
Narosa Publishing House

(2) Mastering Algorithms with C, Kyle Loudon, Shroff Publishers

(3)Algorithms in C (Third Edition): Robert Sedgewick ,
Pearson Education Asia 

(4) Data Structures A Pseudocode Approach with C:
Richard F. Gilberg, Behrouz A. Forouzan , Thomson

(5)  Let us C by Yashwant Kanetkar, BPB

(6)  Programming in ANSI C by Ram Kumar, Rakesh Agrawal, TMH

(7) Programming with C (Second Edition):Byron S Gottfried
(Adapted by Jitender Kumar Chhabra) Schaum’s Outlines (TMH)

(8) Programming with C : K R Venugopal, Sudeep R Prasad
TMH Outline Series

(9) Unix and C : M.P. Bhave and S.A. Pateker
Nandu printers and publishers private limited


Suggestions while writing programs:

  • Use of comments at appropriate places is necessary.
  • Use appropriate indentation while nesting the loops, if-else statements.
  • Do not ignore warnings after the compilation.
  • Optimize the codes as far as possible, by using optimization techniques.

Section I

1.Convert the following algorithms using C:
Exchange the values of two variables with and without temporary variable.

2.Convert the following algorithms using C:
Counting positive numbers from a set of integers.

3.Convert the following algorithms using C:
Summation of  set of numbers.

4.Convert the following algorithms using C :
Reversing the digits of an integer.

5.Convert the following algorithms using C:
Find smallest positive divisor of an integer other then 1.

6.Convert the following algorithms using C:

Find G.C.D. and L.C.M. of two as well as three positive integers.

7.Convert the following algorithms using C:
Generating prime numbers.

8Write a program to find the

(a) sum of two matrices of order m × n and transpose of order m × n where
m, n ≤ 3.

(b) multiplication of two matrices of order m, where m  ≤ 3, finding square and
cube of a square matrix.

(c) Inverse of a matrix

(d) |A| , |B| and verify the identity |A B| = |B A | = |A| . |B| , where | | denote
determinant of the matrix and A and B of size 2 × 2.  

9.Write a program to (a) input a sentence (b) count
the number of occurrences of the given pattern of letters (for instance
‘est or ‘ed’) (c) find the position of the rightmost or leftmost
character occurred from the pattern of letters  

10.Write a program which counts the number of (a) paragraphs occurred.(b) times the word “the” appears in a short story

11Given an array S of n integers. Write a program to
(a) sort the elements in S in ascending order by considering an array
of n-2 elements by any sorting method,  (b) find the median of
elements of S  

Section II

1.Write a program to create functions (a) to generate
twin primes in a given range of numbers, (b) to find the prime factors
of a given integer.

2.Write a program to accept details of 5 customers
that includes customer number, name and mobile number. Create a menu
with options ‘Modify’, ‘Display’ and ‘Exit’. Write functions modify(),
which will allow modification of mobile number and  function
display(), which will display all the details of customers.

3.Write a program to create structure to

(a) find and print the average marks of five subjects along with the name of student.

(b) store names of the states (within India) and their
capital cities. Show the capital by inserting state from the

4.Write a program using pointer notation (a) to write
function to exchange two strings, (b) to determine whether the given
string is a palindrome, (c) to find the average of each students in 3
tests. Number of students can be given from keyboard. 

5.Write a program that accepts a number from the user
and passes a pointer to the number to a function for processing. 
This function passes a pointer to this pointer to another function for
processing of the number.  Both the functions should display the

6.Write a function called increment that accepts a
date structure with three fields. The first field contains the month (a
pointer to string). The second field is an integer showing the day in
month. The third field is an integer showing the year. The function
should increments the date by 1 day and returns the new date. If the
date is the last date in the month, the month field must be changed. If
the month is December, the value of year must be changed when day is
31. A year is leap year if

  1. It is evenly divisible by 4 but not with 100 or
  2. It is evenly divisible by 400

7.Write a program to crate a dynamic one and two
dimension array by accepting number of rows and/or columns from the
user at runtime using pointer notation.

8.Write a program to

(a) read string from the user to check whether it exists in a given file or not.

(b)to accept a file name and then accept contents that should be stored in the file until the user types “end”,

(c) declare a structure representing student, accept data of 5 students and store it in a file,

(d) convert a capital case letter file to small case letter file

9.Write a program to compute factorial of a large number.

10.The Ackerman’s function Ack(m ,n) is defined recursively by

  • a    If m = 0 then Ack(m ,n) = n+1,
  • If  m ≠ 0 but n = 0 then Ack(m ,n) = Ack(m-1 ,1),
  • If  m ≠ 0 and n ≠ 0  then Ack(m ,n) = Ack(m-1 , Ack(m, n-1))
  • Write a program to calculate Ack(0 ,n), Ack(4 ,0), Ack(6 ,10)

11.Fibonacci sequence is defined by

  • If n = 0 or n = 1 then F n = n;
  • If n > 1 then F n = F n – 2  + F n -1
  • Write a program to generate Fibonacci sequence.

12.Write a program to solve Tower of Hanoi problem

13.Write a program to create a linked list
containing student’s name and marks (a) search marks of a particular
student (b) insert a new student at the beginning of the list. (c)
insert a new student at the end of the list (d) delete a particular
student from a list.

14.Write a program to create following stack of characters, where STACK is allocated N=8 memory cells:

  • STACK: A, C, D, F, K, ___, ___, ___.
  • (For notation convenience, we use “__“ to
    denote an empty memory cell ). The program should describe the STACK
    after the following operations take place:
    1. POP (STACK, ITEM) 
    2. POP( STACK, ITEM)
    3. PUSH( STACK, L)
    4. PUSH( STACK, P)
    5. POP (STACK, ITEM)
    6. PUSH(STACK, R)
    7. PUSH(STACK, S)
    9. The POP always deletes the top element from the stack, and the PUSH always adds the new element to the top of the stack.

15.Write a program to create following queue of cities, where QUEUE is allocated 6 memory cells:

QUEUE: _____, Latur, Bashirabad, Rawalgav,Palanpur, _____ 

(For notation convenience, we use “___ “to denote an
empty memory cell ). Where FRONT = 2, REAR= 5.The program should
describe the QUEUE, including FRONT and REAR, after the following
operations take place

:(a)Allahabad is added,

(b) two cities are deleted,

(c) Mumbai is added,

(d) Mathura is added,

(e) three cities are deleted and

(f) Nagpur is added.

Saturday, June 4, 2011

Online Research e-Journals


The ideal teacher

Here's a bit I came across recently in a very old issue of the, now defunct, Science Age magazine (Sept 1985) that was published by the Nehru Centre, Bombay. I thought its worth sharing for its sheer beauty and the fact that these ideas havenot changed still!

The Jain author Pavanandi served at the court of the Chola emperor Kulottunga III (1178 - 1216 AD ?). He is known for his work on Tamil grammar.

He also defined the characteristics of an ideal teacher: "The teacher must be a man of good birth, gentle and godly by nature and of a generous outlook. He must be deeply learned in book-lore and capable of expounding his knowledge with directness and simplicity". He must also combine common sense with these high qualities. The teacher must unite in himself the characteristic features of the earth. The earth signifies four qualities; first, extent or vastness of size, so great that you could not take it all in at a glance from any one point; secondly, strength not to yield under the stress of great weight; thirdly, patience even towards those who dig into and otherwise cause hurt and damage; and lastly, capacity to yield fruits commensurate to the timeliness and intensity of effort on the part of the cultivator.

Pavanandi also states that the teacher should also be like a mountain, the weighing rod and the flower. The mountain impresses us by its great size and the variety of its products, is visible from a great distance, and sustains life even during a drought; so too the good teacher is marked by wide range of his studies, his fame spreads far and wide, and gives freely of the abundance of his knowledge even if there is no money in his profession. As the weighing rod weighs accurately and impartially, so too does the good teacher the merits and desserts of his pupils. The good teacher, like the flower, is sought after on all happy occassions, carries about him a fine flavour that endears him to all and presents a joyful countenance.