A PRACTICAL WORKBOOK FOR COMPUTER SCIENCE (C++) CLASS XI

Similar documents
Excel Formulas & Functions

GACE Computer Science Assessment Test at a Glance

Kendriya Vidyalaya Sangathan

MMOG Subscription Business Models: Table of Contents

Dialogue Live Clientside

School of Innovative Technologies and Engineering

PeopleSoft Human Capital Management 9.2 (through Update Image 23) Hardware and Software Requirements

SCT Banner Student Fee Assessment Training Workbook October 2005 Release 7.2

Submission of a Doctoral Thesis as a Series of Publications

THE ALLEGORY OF THE CATS By David J. LeMaster

Guide to Teaching Computer Science

Characteristics of the Text Genre Informational Text Text Structure

1. M. Sc. Program objectives

Lecture Notes on Mathematical Olympiad Courses

Instrumentation, Control & Automation Staffing. Maintenance Benchmarking Study

Intel-powered Classmate PC. SMART Response* Training Foils. Version 2.0

12-WEEK GRE STUDY PLAN

Asked Questions (FAQs) and Answers

McGraw-Hill Connect and Create Built by Blackboard. Release Notes. Version 2.3 for Blackboard Learn 9.1

Learning Microsoft Publisher , (Weixel et al)

SAMPLE AFFILIATION AGREEMENT

Characteristics of the Text Genre Informational Text Text Structure

The University of Iceland

THE PROMOTION OF SOCIAL AWARENESS

PROSPECTUS DIPLOMA IN CENTRAL EXCISE AND CUSTOMS. iiem. w w w. i i e m. c o m

Fountas-Pinnell Level P Informational Text

Developing Autonomy in Language Learners: Diagnostic Teaching. LEARN Workshop July 28 and 29, 2015 Ra ed F. Qasem

INDIAN STATISTICAL INSTITUTE 203, BARRACKPORE TRUNK ROAD KOLKATA

MASTER S COURSES FASHION START-UP

IIT. That s where I long to belong.

STATUS OF OPAC AND WEB OPAC IN LAW UNIVERSITY LIBRARIES IN SOUTH INDIA

SkillPort Quick Start Guide 7.0

Briefing document CII Continuing Professional Development (CPD) scheme.

Mangalagangothri , D.K. District, Karnataka

The Singapore Copyright Act applies to the use of this document.

Chamilo 2.0: A Second Generation Open Source E-learning and Collaboration Platform

Houghton Mifflin Online Assessment System Walkthrough Guide

Course Content Concepts

Outreach Connect User Manual

SOFTWARE EVALUATION TOOL

Quick Start Guide 7.0

To link to this article: PLEASE SCROLL DOWN FOR ARTICLE

Guidelines for Completion of an Application for Temporary Licence under Section 24 of the Architects Act R.S.O. 1990

[For Admission Test to VI Class] Based on N.C.E.R.T. Pattern. By J. N. Sharma & T. S. Jain UPKAR PRAKASHAN, AGRA 2

THE UNITED REPUBLIC OF TANZANIA MINISTRY OF EDUCATION, SCIENCE, TECHNOLOGY AND VOCATIONAL TRAINING CURRICULUM FOR BASIC EDUCATION STANDARD I AND II

DOCTORAL SCHOOL TRAINING AND DEVELOPMENT PROGRAMME

At least One year experience of Data Entry operation in personal computer.

Modified Systematic Approach to Answering Questions J A M I L A H A L S A I D A N, M S C.

2013/Q&PQ THE SOUTH AFRICAN QUALIFICATIONS AUTHORITY

Pragmatic Use Case Writing

PM tutor. Estimate Activity Durations Part 2. Presented by Dipo Tepede, PMP, SSBB, MBA. Empowering Excellence. Powered by POeT Solvers Limited

Characteristics of the Text Genre Realistic fi ction Text Structure

ESIC Advt. No. 06/2017, dated WALK IN INTERVIEW ON

EDEXCEL FUNCTIONAL SKILLS PILOT TEACHER S NOTES. Maths Level 2. Chapter 4. Working with measures

PowerTeacher Gradebook User Guide PowerSchool Student Information System

Introduction to Moodle

SIE: Speech Enabled Interface for E-Learning

SEPERAC MEE QUICK REVIEW OUTLINE

POFI 1349 Spreadsheets ONLINE COURSE SYLLABUS

CS 1103 Computer Science I Honors. Fall Instructor Muller. Syllabus

Software Development: Programming Paradigms (SCQF level 8)

Business Finance in New Zealand 2004

Legal Technicians: A Limited License to Practice Law Ellen Reed, King County Bar Association, Seattle, WA

UNIVERSITY OF MYSORE * * *

National Institute of Technology, Tiruchirappalli: Performa for CV of Faculty/ Staff Members

Learning Microsoft Office Excel

MODULE 7 REFERENCE TO ACCREDITATION AND ADVERTISING

Dual Degree (B.Tech & M.Tech) / Dual Degree [B.Tech(Honours) & M.Tech]/ Dual Degree (BS & MS)/Dual Degree (BS (Honours) & MS)

D Road Maps 6. A Guide to Learning System Dynamics. System Dynamics in Education Project

IMPORTANT INFORMATION

Digital Technology Merit Badge Workbook

Practical Research Planning and Design Paul D. Leedy Jeanne Ellis Ormrod Tenth Edition

Course Syllabus for Math

Study Group Handbook

MINISTRY OF EDUCATION

SRI RAMACHANDRA UNIVERSITY (Declared under Section 3 of the UGC Act, 1956)

Constructing a support system for self-learning playing the piano at the beginning stage

A STUDY ON INFORMATION SEEKING BEHAVIOUR OF STUDENTS WITH SPECIAL REFERENCE TO ENGINEERING COLLEGES IN VELLORE DISTRICT G. SARALA

CHALLENGES FACING DEVELOPMENT OF STRATEGIC PLANS IN PUBLIC SECONDARY SCHOOLS IN MWINGI CENTRAL DISTRICT, KENYA

RAJASTHAN CENTRALIZED ADMISSIONS TO BACHELOR OF PHYSIOTHERAPY COURSE-2017 (RCA BPT-2017) INFORMATION BOOKLET

Advanced Grammar in Use

SCT Banner Financial Aid Needs Analysis Training Workbook January 2005 Release 7

CENTRAL MAINE COMMUNITY COLLEGE Introduction to Computer Applications BCA ; FALL 2011

K-12 PROFESSIONAL DEVELOPMENT

Rules of Procedure for Approval of Law Schools

PUTRA BUSINESS SCHOOL (GRADUATE STUDIES RULES) NO. CONTENT PAGE. 1. Citation and Commencement 4 2. Definitions and Interpretations 4

MAHATMA GANDHI KASHI VIDYAPITH Deptt. of Library and Information Science B.Lib. I.Sc. Syllabus

Dr. Ramesh C Gaur. PGDCA, MLISc,Ph.D. Fulbright Scholar (Virginia Tech, USA)

Strategies for Differentiating

Guidelines for the Use of the Continuing Education Unit (CEU)

Instructor Experience and Qualifications Professor of Business at NDNU; Over twenty-five years of experience in teaching undergraduate students.

IMPROVE THE QUALITY OF WELDING

University of Groningen. Systemen, planning, netwerken Bosman, Aart

Instructions and Guidelines for Promotion and Tenure Review of IUB Librarians

University Faculty Details Page on DU Web-site

leading people through change

Mehul Raithatha. Education Qualifications

Software Maintenance

ARKANSAS TECH UNIVERSITY

Practice Learning Handbook

Transcription:

A PRACTICAL WORKBOOK FOR COMPUTER SCIENCE (C++) CLASS XI

A PRACTICAL WORKBOOK FOR COMPUTER SCIENCE (C++) CLASS XI (Strictly according to new curriculum prescribed by CBSE) By Pavithra Karthik, B.Tech, MS (IT) Lecturer, Arsha Vidya Mandir Senior Secondary School, Chennai, Tamil Nadu LAXMI PUBLICATIONS (P) LTD BANGALORE CHENNAI COCHIN GUWAHATI HYDERABAD JALANDHAR KOLKATA LUCKNOW MUMBAI RANCHI INDIA USA GHANA KENYA

A PRACTICAL WORKBOOK FOR COMPUTER SCIENCE (C + +) XI Copyright by Laxmi Publications (P) Ltd. All rights reserved including those of translation into other languages. In accordance with the Copyright (Amendment) Act, 2012, no part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise. Any such act or scanning, uploading, and or electronic sharing of any part of this book without the permission of the publisher constitutes unlawful piracy and theft of the copyright holder s intellectual property. If you would like to use material from the book (other than for review purposes), prior written permission must be obtained from the publishers. Printed and bound in India Typeset at Excellent Graphics, Delhi New Edition T11-8858-125-PRAC WORKBK COMP SC C++ XI ISBN 978-93-5138-065-8 Price: ` 125.00 Limits of Liability/Disclaimer of Warranty: The publisher and the author make no representation or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties. The advice, strategies, and activities contained herein may not be suitable for every situation. In performing activities adult supervision must be sought. Likewise, common sense and care are essential to the conduct of any and all activities, whether described in this book or otherwise. Neither the publisher nor the author shall be liable or assumes any responsibility for any injuries or damages arising herefrom. The fact that an organization or Website if referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Website may provide or recommendations it may make. Further, readers must be aware that the Internet Websites listed in this work may have changed or disappeared between when this work was written and when it is read. All trademarks, logos or any other mark such as Vibgyor, USP, Amanda, Golden Bells, Firewall Media, Mercury, Trinity, Laxmi appearing in this work are trademarks and intellectual property owned by or licensed to Laxmi Publications, its subsidiaries or affiliates. Notwithstanding this disclaimer, all other names and marks mentioned in this work are the trade names, trademarks or service marks of their respective owners. PUBLISHED IN INDIA BY Laxmi Publications (P) Ltd. 113, GOLDEN HOUSE, DARYAGANJ, NEW DELHI - 110002, INDIA Telephone : 91-11-4353 2500, 4353 2501 Fax : 91-11-2325 2572, 4353 2528 www.laxmipublications.com info@laxmipublications.com Branches & Bangalore 080-26 75 69 30 & Chennai 044-24 34 47 26, 24 35 95 07 & Cochin 0484-237 70 04, 405 13 03 & Guwahati 0361-254 36 69, 251 38 81 & Hyderabad 040-27 55 53 83, 27 55 53 93 & Jalandhar 0181-222 12 72 & Kolkata 033-22 27 43 84 & Lucknow 0522-220 99 16 & Mumbai 022-24 91 54 15, 24 92 78 69 & Ranchi 0651-220 44 64 C Printed at:

CONTENTS Syllabus-Class XI (Practical)... (xi) Unit 1 : Control Structures Sequential, Conditional and Iterative Statements... 1 26 1. Roots of a Quadratic Equation... 3 2. Electricity Bill Generation... 5 3. Area Calculator Usiug Switch... 7 4. Summation of Series... 9 5. Number Game... 12 6. Summation Using Do while... 16 7. Fibonacci Series... 18 8. Decimal to Binary Conversion... 19 9. Pattern Generation... 21... 24... 25 Additional Questions... 26 UNIT 2 : ARRAYS... 27 38 1. Array of Employees... 27 2. Array Manipulation... 29 3. 2D Array Manipulation... 33... 37... 37 Additional Questions... 38 UNIT 3 : STRINGS... 39 45 1. Counting Vowels... 40 2. Sorting an Array of Strings... 41 3. Palindrome... 43... 45... 45 Additional Questions... 45 UNIT 4 : FUNCTIONS... 46 52 1. Four Function Calculator Using Functions... 46 2. Functions and Default Arguments... 49... 51... 52 Additional Questions... 52 ( v )

( vi ) UNIT 5 : EVENT DRIVEN PROGRAMMING... 53 62 1. Guessing Number Game Program... 53 2. Cows and Bulls... 55 3. Hangman... 58... 62... 62 UNIT 6 : STRUCTURES... 63 72 1. Employee Structure... 63 2. Complex Numbers... 67... 71... 72 UNIT 7 : SAMPLE PROJECTS... 73 98 1. Alien Code Generator Lorrinator... 73 2. Modern Periodic Table... 84 APPENDIX A : INSTALLING AND EXECUTING PROGRAMS IN C++... 99 112 APPENDIX B: COMMON ERRORS AND SUGGESTIONS TO CORRECT... 113 114

FOREWORD Mrs. Pavithra, obtained her B.Tech from Adhiparasakthi Engineering College, Melmaruvathur. She did her M.S (by Research) under my guidance at Madras Institute of Technology, Anna University, Chennai. Pavithra was a constant achiever right from her school days. She stood district 2 nd in class 10 and got a state 3 rd rank in English in class 12. She also secured a university gold medal in B.Tech. She worked with Cognizant technology solutions for over 4 years. Her certifications include Microsoft certified Programmer (ASP.NET), Java Certificate (SCJP) and webmethods certified professional. A software programmer by profession, she switched her career to teaching. She now divides her time for tutoring various engineering students across the globe and works part-time, lecturing students of class 11 and 12 at Arsha Vidya Mandir CBSE School, Chennai. This practical book is an excellent work of compilation of relevant C++ programs required for students of class 11. It would also help a novice to learn the basics of C++ language. Practice problems are given at the end of each unit followed by probable viva questions covering the relevant topics. This book would serve as a practical guide for students preparing for their practical exams. All the best. Dr S. Thamarai Selvi Professor and Dean, Department of Computer Technology, Madras Institute of Technology, Anna University Chennai. ( vii )

PREFACE This practical workbook is intended to be used by Computer Science students of class 11 in CBSE curriculum. This workbook provides the requisite background material as well as numerous computing problems covering all difficulty levels. This book can also be used by students learning the C++ language. The objectives of this book are: 1. Defining clearly the scope of the course. 2. Bringing uniformity in the way the course is conducted across different schools strictly catering to CBSE syllabus. 3. Providing ready reference for students while working in the lab. 4. Slow learners can learn the programs already solved while the fast paced learners can improve their computing skills by trying the practice problems. This book is organized into 7 units. Unit 1 deals with control structures of C++. It has 9 programs. These programs explain if else structure, switch construct, for, while and do while loops. They also explain pattern generation using nested loops. Unit 2 deals with arrays. It has 4 programs which explain insertion, deletion, searching, sorting, maximum and minimum in 1D array. It also explains 2D array manipulation. Unit 3 deals with strings. It has 3 programs. It has programs for counting vowels, palindrome and sorting an array of strings. Unit 4 explains functions. It demonstrates four function calculator using functions and functions with default arguments. Unit 5 explains event-driven programming has 3 programs: A guessing number game, cows and bulls and Hangman. Unit 6 deals with Structures. It explains an employee structure and complex number arithmetic using structures. Unit 7 deals with sample projects. Project 1 is an encryption algorithm using strings, functions and arrays. Project 2 is a simulation of a Modern periodic table using structures. Appendix 1 explains the step-by-step installation of Visual C++ software. It also explains how to create a simple C++ application. Appendix 2 lists some common errors in programming and suggestions to correct it. This book is intended to be simple yet effective for class 11 students who would use this ready reference for better preparation. All programs have been thoroughly tested and screenshots are provided after every program for better understanding. Author ( ix )

ACKNOWLEDGEMENTS I dedicate this book to my parents, who have been a constant source of inspiration to me right from my childhood. They have taught me that Whatever happens, happens for a reason and have helped me to accept life in its stride and give my best wherever I am and in whatever I do. Behind every successful woman, needs to be her husband and this book is a proof of that support. I thank my husband, Karthik and my brother-in-law Mr.Bharani Rajan, for the technical review of the book. I got a good critic in them, and thanks to them, the book is in a much better shape now than how it was initially. A special thanks to my sister-in-law, Kanchan for helping me in designing the flowcharts. I would like to thank each of my family members, including my kids, who have been instrumental in encouraging me in writing this book. I thank them from the bottom of my heart for helping me achieve this height. I thank Laxmi publications for having confidence in me and publishing my book. They have brought my talent to the outside world. Last but not the least, I would like to thank each one of my students who have encouraged me to write this book. They have helped me in continuous learning and researching and hope my journey continues. Author ( x )

SYLLABUS Class XI (Practical) Duration: 3 Hours Total Marks: 30 1. Programming in C++ (10) One programming problem in C++ to be developed and tested in Computer during the examination. Marks are allotted on the basis of following: Logic: 5 Marks Documentation/Indentation: 2 Marks Output presentation: 3 Marks Note: The types of problems to be given will be of application type from the following topics 2. Project Work (10) 1. Preamble 1.1 The academic course in Computer Science includes one Project each year. The purpose behind this is to consolidate the concepts and practices imparted during the course and to serve as a record of competence. 1.2 A group of two/three students as team may be allowed to work on one project. 2. Project content 2.1 Project can be selected from one of the topics given in event programming. Theme of the project can be: Any subsystem of a System Software or Tool Any Scientific or a fairly complex algorithmic situation. Business oriented problems like Banking, Library information system, Hotel or Hospital management system, Transport query system Quizzes/Games; Tutor/Computer Aided Learning Systems 2.2 The aim of the project is to highlight the abilities of algorithmic formulation, modular programming, optimized code preparation, systematic documentation and other associated aspects of Software Development. 2.3 The assessment would be through the project demonstration and the Project Report, which should portray Programming Style, Structured Design, Minimum Coupling, High Cohesion, Good documentation of the code to ensure readability and ease of maintenance. 3. Practical file (05) Must have minimum 15 programs from the topics covered in class XI course. 4. Viva voce (05) Viva will be asked from syllabus covered in class XI and the project developed by the student. ( xi )

A Practical Workbook For Computer Science (C++) Class 11th New 2014 40% OFF Publisher : Laxmi Publications ISBN : 9789351380658 Author : Pavithra Karthik Type the URL : http://www.kopykitab.com/product/4 356 Get this ebook