Lab Manual. Program Design and File Structures (P): IT-219

Similar documents
COMPUTER PROGRAMMING LAB

UNIVERSITY OF ENGINEERING & MANAGEMENT, KOLKATA C ASSIGNMENTS

Week 0. Net Salary =Earnings- deductions; Read the employee number, Basic Print employee Number, Earnings,Deductions and Net salary.

I Year MCA I Semester L T P To C FOUNDATIONS OF INFORMATION TECHNOLOGY

VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANGULATHUR

Algorithms 4. Odd or even Algorithm 5. Greatest among three numbers Algorithm 6. Simple Calculator Algorithm

PROGRAMMING IN C AND C++:

B. V. Patel Institute of Business Management, Computer & Information Technology, UTU 2013

Number Theory Open, Round 1 Test #101

Programming for Problem Solving 105A L T P Credit Major Minor Total Time

Subject: Computer Science

Suggestive List of C++ Programs

(i) Describe in detail about the classification of computers with their features and limitations(10)

Reg. No. : Question Paper Code : 27157

VALLIAMMAI ENGINEERING COLLEGE

The transition: Each student passes half his store of candies to the right. students with an odd number of candies eat one.

Computer Science 217

Hrs Hrs Hrs Hrs Hrs Marks Marks Marks Marks Marks

[6] [6] [6] [5] [5] [6] [5] [5]

Subject: PROBLEM SOLVING THROUGH C Time: 3 Hours Max. Marks: 100

Question 4- Write a program to input a word from the user and remove the duplicate characters present in it. Example:

Discrete Structures. Fall Homework3

UEE1302(1066) F12: Introduction to Computers and Programming Function (II) - Parameter

Sardar Patel University S Y BSc. Computer Science CS-201 Introduction to Programming Language Effective from July-2002

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING COMPUTER PROGRAMMING LABORATORY LAB MANUAL - 15CPL16 SEMESTER-I/II

TIME: 3 HOURS MARKS: a. Develop a java program to sort an array of N numbers in ascending order. (40)

VARIABLE, OPERATOR AND EXPRESSION [SET 1]

Loops / Repetition Statements

PDS Lab (Assignment 1) Date: 31 st July, 2017 (2-6 pm)

Questions Bank. 14) State any four advantages of using flow-chart

5. Hashing. 5.1 General Idea. 5.2 Hash Function. 5.3 Separate Chaining. 5.4 Open Addressing. 5.5 Rehashing. 5.6 Extendible Hashing. 5.

A Survey of Mathematics with Applications 8 th Edition, 2009

Examples for Algorithm,Pseduocode,Flowchart

INDIAN SCHOOL MUSCAT COMPUTER SCIENCE(083) CLASS XI

PROGRAMS. EXCELLENT ACADEMY OF ENGINEERING. Telephone: / NORMAL PROGRAM

Downloaded from

PROBLEM SOLVING TECHNIQUES SECTION - A. 1. Answer any ten of the following

Chapter 1 An Introduction to Computer Science. INVITATION TO Computer Science 1

Syllabus of Diploma Engineering. Computer Engineering. Semester: II. Subject Name: Computer Programming. Subject Code: 09CE1104

INSTITUTE OF AERONAUTICAL ENGINEERING

sends the formatted data to the standard output stream (stdout) int printf ( format_string, argument_1, argument_2,... ) ;

Table of Contents. Chapter 1: Introduction to Data Structures... 1

Integers are whole numbers; they include negative whole numbers and zero. For example -7, 0, 18 are integers, 1.5 is not.

SECOND SEMESTER BCA : Syllabus Copy

Two Approaches to Algorithms An Example (1) Iteration (2) Recursion

CS 61B Summer 2005 (Porter) Midterm 2 July 21, SOLUTIONS. Do not open until told to begin

1. Find f(1), f(2), f(3), and f(4) if f(n) is defined recursively by f(0) = 1 and for n = 0, 1, 2,

CS 6402 DESIGN AND ANALYSIS OF ALGORITHMS QUESTION BANK

X Std. Topic Content Expected Learning Outcomes Mode of Transaction

CS 210 Algorithms and Data Structures College of Information Technology and Engineering Weisberg Division of Engineering and Computer Science

Lecture 4: Advanced Data Structures

CS 97SI: INTRODUCTION TO PROGRAMMING CONTESTS. Jaehyun Park

Activity Overview A basic introduction to the many features of the calculator function of the TI-Nspire

Number System. Introduction. Natural Numbers (N) Whole Numbers (W) Integers (Z) Prime Numbers (P) Face Value. Place Value

Practical List of. MCA IV SEM Session -2010

RtI 7. Curriculum (219 topics additional topics)

1. How many white tiles will be in Design 5 of the pattern? Explain your reasoning.

ANNA UNIVERSITY: CHENNAI B.E./B.Tech. DEGREE EXAMINATIONS, JAN Regulations First Semester (Common to All Branches )

Gujarat University M. Sc. Computer Science [S. F.] Semester-1 Syllabus Gujarat Arts & Science College, Ahmedabad.

A6-R3: DATA STRUCTURE THROUGH C LANGUAGE

Symbol Table. Symbol table is used widely in many applications. dictionary is a kind of symbol table data dictionary is database management

Draw a diagram of an empty circular queue and describe it to the reader.

Kadi Sarva Vishwavidyalaya, Gandhinagar

Reg. No. : Question Paper Code : B.E./B.Tech. DEGREE EXAMINATION, JANUARY First Semester GE 6151 COMPUTER PROGRAMMING

COE 202- Digital Logic. Number Systems II. Dr. Abdulaziz Y. Barnawi COE Department KFUPM. January 23, Abdulaziz Barnawi. COE 202 Logic Design

Module 2: Classical Algorithm Design Techniques

Mathematics. Jaehyun Park. CS 97SI Stanford University. June 29, 2015

CSci 1113, Fall 2015 Lab Exercise 4 (Week 5): Write Your Own Functions. User Defined Functions

UNIT I : OVERVIEW OF COMPUTERS AND C-PROGRAMMING

1. What is the minimum number of bits needed to store a single piece of data representing: a. An integer between 0 and 100?

Rational numbers as decimals and as integer fractions

DR. A.P.J. ABDUL KALAM TECHNICAL UNIVERSITY LUCKNOW. Evaluation Scheme & Syllabus. For. B.Tech. First Year (Programming for Problem Solving)

KLiC C Programming. (KLiC Certificate in C Programming)

I2204 ImperativeProgramming Semester: 1 Academic Year: 2018/2019 Credits: 5 Dr Antoun Yaacoub

COMPUTER SCIENCE Paper 1

MODULE 2: Branching and Looping

Assertions & Verification & Example Loop Invariants Example Exam Questions

More About Factoring Trinomials

Question Bank Subject: Advanced Data Structures Class: SE Computer

PESIT Bangalore South Campus Department of MCA Course Information for

COSC 2007 Data Structures II Final Exam. Part 1: multiple choice (1 mark each, total 30 marks, circle the correct answer)

Andrew Shitov. Using Perl Programming Challenges Solved with the Perl 6 Programming Language

CSCE 110 Dr. Amr Goneid Exercise Sheet (7): Exercises on Recursion (Solutions)

Performance Level Descriptors. Mathematics

BCA-105 C Language What is C? History of C

Standardized Tests: Best Practices for the TI-Nspire CX

Swami Ramanand Teerth Marathwada University, Nanded

CHOICE BASED CREDIT SYSTEM (With effect from )

6th Grade Arithmetic (with QuickTables)

C- PROGRAMMING (3:0:0) Sub code : CS1C01/CS2C01 CIE : 50%Marks Hrs/week : 03 SEE : 50%Marks SEE Hrs : 03 Hours Max. Marks: 100 Course Outcomes:

CS 2412 Data Structures. Chapter 10 Sorting and Searching

Algorithms and Data Structures Spring 2008

1. Let n be a positive number. a. When we divide a decimal number, n, by 10, how are the numeral and the quotient related?

CPSC 121 Some Sample Questions for the Final Exam Tuesday, April 15, 2014, 8:30AM

Using the Best of Both!

WRITE COMMANDS USING sed or grep (1 mark each) 2014 oct./nov march/april Commands using grep or egrep. (1 mark each)

Sai Nath University. Assignment For B.Sc-IT 6 TH

Sai Nath University. Assignment For MCA 1 st

PROGRAMMING IN C LAB MANUAL FOR DIPLOMA IN ECE/EEE

Hashing for searching

Transcription:

Lab Manual Program Design and File Structures (P): IT-219

Lab Instructions Several practicals / programs? Whether an experiment contains one or several practicals /programs One practical / program Lab Teacher forms groups of the students based on All Students need to perform the practical/program Assign all practicals /programs among all groups Teacher decides whether the completed practicals / programs can be appropriately described using flow chart, algorithm, query statement, etc. Teacher issues necessary instructions to the students for writing practicals / programs accordingly Students write experiments in practical files and get them signed by the lab teacher Students make entries in the list of contents of the practical files and get them signed by the lab teacher Whether practical has been verified and signed by the lab teacher?? If a student has not completed a practical, he/she is expected to complete it at his/her own with the help of his/her fellow students in his/her hostel The student completes the practical file and submits it to the concerned teacher in his/her office or mail box on next working day In case of an experiment containing several practicals, a lab teacher needs to think whether a practical performed by the students in one group needs to be repeated by the other groups in lab on the same day? OR A practical performed by the students in one group needs to be repeated as assignments to be completed by the students of other groups in their hostels? Here, an assignment includes both executing a program on computer and also writing the same in practical file. OR A practical performed by the students in one group needs to be repeated as assignments, only writing practicals in their practical files, for the students of other groups in their hostels? Teacher issues necessary instructions to the students accordingly.

L T P - - 2 Lab Manual Program Design and File Structures (P) IT-219 Practical exam: 40 Sessional: 60 NOTE: Implement the following using C Language on Linux or Windows like platform. Experiment 1 I. Write a program to calculate all the factors of a given integer number. Write a program to calculate Primes in a Range (Using a function that checks if an integer n is a prime). I Write a program to compute exponential Function (e x = 1 + x + x 2 / 2! + x 3 / 3! + + x n / n!). Write a program to open a file and write data to that. V. Write a program to develop scientific calculator. VI. Write a program to print a circular matrix of given order. Like for order 3. 1 2 3 8 9 4 7 6 5 V Write a program to check whether the binary representation of an integer is pallindrom or not. Experiment 2 I. Write a program to check whether a year is leap year or not. Write a program to print the value of f(x) = ax 2 + bx + c for a = 1.0, b=2.0 and c = 1.0 for x = 3.0, and 4.0 respectively. I Compute Julian Day (Julian day is the number of days inclusive for a day counting from new year day inclusive. January 20 is Julian day 20, April 15 is Julian day 31 + 1

28 + 31 + 15 = 105 for an ordinary year and April 15 is Julian day 31 + 29 + 31 + 15 = 106 for a leap year). Write a program to find the roots of a quadratic equation. (Real and Imaginary, Take the values of a, b and c from user). V. Write a program to compute the value of ncm using Recursion where n and m are input by user. VI. Write a program to print pascal triangle. Example pascal triangle of order 3 is 1 1 2 1 1 3 3 1 V Read an integer number of a fixed length and then print its digits separated by spaces. For example if 364 is the input then the output should be 3 6 4. Experiment 3 I. Write a program to check whether a number is odd or even. I Write a program for base conversion (a decimal to another base like binary, octal). Write a program to print diamond pattern. (Use * to print the pattern). Write a program to Generate the first n terms of the Fibonacci series. The first and second terms in the sequence are 0 and 1. V. Write a program to read three values from keyboard and print out largest of them without using if statement. VI. V Write a program to check whether a number is Armstrong or not (e.g. 153=13+53+33). Write a program to solve Towers of Hanoi problem. 2

Experiment 4 I. Write a program to add n numbers which will be entered by user without using any array. I Write a program to check whether a given number is palindrome or not. Write a program to find the day on given date. Write a program that insert a sub-string into given main string from a given position. V. Write a program to find sum like-1+2*3+3*4*5+4*5*6*7 +n*(n+1) *(2n-1) where n is input by the user. VI. Write a program to generate a magic square of odd order like magic square of order 3 is 8 1 6 3 5 7 4 9 2 V Write a program to add two matrix.(no need to take the matrix from user) Experiment 5 I. Write a program to find the GCD (greatest common divisor) of two given integers in recursive and non recursive way. I Write a program to check whether input alphabet is vowel or not. Write a program to find all the combinations of 1, 2 and 3. Write a program, which takes two integers operands and one operator from the user, performs the operation and prints the result.(consider the operators +,-,*,/,% and use switch Statement). V. Write a program to delete the duplicate element of an array in order of O(n) time complexity. VI. Write a program to count the words and characters in a given sentence. V Implement a GUI/Mouse driven simple calculator. 3

Experiment 6 (File Handling) I. Write a program to Create a File & Store Information. I Write a program to illustrate Reading of Data from a File and to delete or replace a specific Line from a Text File. Write a program that Merges Lines Alternatively from 2 Files & Print Result. Write a program to Create Employee Record and Update it. V. Write a program to Convert the Contents of File to Lower case and replace First Letter of every Word with Capital Letter. VI. V Write a program to Count No of Lines, Blank Lines, Comments in a given Program and also Reverse the Contents of a File and Print it. Write a program to Create Employee File Name Record that is taken from the Command-Line Argument. Experiment 7 (Hashing) I. Write a program to implement Division-Remainder hashing. I Write a program to implement Mid-Square hashing. Write a program to implement Folding hashing. Write a program to implement Division-Remainder hashing. V. Write a program to calculate load factor. VI. V VI Write a program to calculate Linear probing. Write a program to calculate double hashing. Write a program to calculate synonym chaining. 4

Experiment 8 (B-Tree and Merging) I. Write a program that builds a B-tree of order 3 from an input sequence of key values. Write a program to traverse a B-tree of order 3 in sequence by key value. I Write a program to locate a given key value in a B-tree of order 3. Write a program to maintain a B-tree of order 3. Be able to accommodate key insertions and deletions. V. Write a program to implement Natural merge VI. Write a program to implement Balanced merge V Write a program to implement Cascade merge 5