DATA STRUCTURE USING C++
|
|
- Ethelbert Randall
- 6 years ago
- Views:
Transcription
1 DATA STRUCTURE USING C++ Ghuam Gilanie Janjua Muhammad Attique Goheer Adnan Hameed Qureshi Dr. Hafeez Ullah Janjua Innovative New Al-Badar Kitab Ghar Publisher and Distributor University Chowk, Bahawalpur
2 Data Structure using C Innovative All rights reserved. No part of this book may be reproduced, stored in a retrieval system or transmitted in any form or by any means, without the prior written permission of the publisher and or writers, except in the case of brief quotations embodied in critical articles or reviews. The authors and publisher have made every effort in the preparation of this book to ensure the accuracy of the information. However, the information in this book is sold without warranty, either express or implied. C++ source code used in this book is available on Innovative.org
3 Credits Authors Ghulam Gilanie Janjua Muhammad Attique Goheer Adnan Hameed Qureshi Dr. Hafeez Ullah Janjua Technical Reviewers Dr. Shahid Naweed Shazia Hassan Kashif Hameed Muhammad Saifullah Shahid Nawaz Mirza Adnan Baig Zafar Saeed Technical Editor Sara Naheed Managing Editor Dr. Hafeez Ullah Janjua Qaiser Hassan Graphic Designers Muhammad Faisal Chughtai Muhammad Zubair
4 About Authors Ghulam Gilanie Janjua Ghulam Gilanie Janjua is M.Phil in Computer Science. He has diversified experience in programming field. He has vast experience of development at different software houses. He is currently working as Computer Programmer in NH &MP. He has already published a book on programming with ANSI C. He is currently working on bio-computing and diagnostic images. He has published his research work in well reputed international journals. His research interests are Medical Image Processing and Pattern Recognition. Muhammad Attique Goheer Adnan Hameed Qureshi Dr. Hafeez Ullah Janjua
5
6
7 Designed by: Muhammad Faisal Chughtai ( ) Graphic Designer, Innovative Research Centre, Bahawalpur Stockiest: New Al-Badar Kitab Ghar University Chowk, Bahawalpur , Price: Rs. 250/-
8
9 Acknowledgement We are nothing without the support and blessings of Almighty Allah, my faith in the pious and peaceful religion Islam and faith in the last messenger of Allah, Hazrat Muhammad (P.B.U.H) are strengthen us to carried out each and every bit of my life and so as in this work. Exceptional thanks for Prof. Dr. Muhammad Shahid Naweed providing us valuable connotation regarding innovative ideas. He is probably the best described as fountains of enthusiasm and ideas. It made possible the book with his continued mentorship. Throughout the entire book compilation period his depth of knowledge on the topic, suggestions for continuous improvement, encouragement and assistance helped me to finalize the product. We would also like to thank Qasim Zia and M. Mashhood for their wit, intelligence, impeccable professionalism, and vision who provided an endless supply of visionary ideas and showed me the sky, assist me out during the entire project period with various resources, constructive suggestions and ideas. I am deeply thankful and want to express my honest appreciations to my dear friends for their guidance and friendship who helped me time to time with problem solving, idea generation, and providing required project related information. I appreciate their precious time, assistance and moral support. We would like to thank all of the great people at Innovative Research Center, Bahawalpur, Pakistan for their guidance along the way. Also thanks to XXX and XXXX for keeping everything organized and on track. Big thanks to my students Shamas Bilal, M. Faisal, Tariq Baloch, Mazhar Iqbal, Hafiz Shakeel, Jamshed Hashmi, Sanaullah Tariq, Noman Akram, Waqas Ahmad, Faisal Abba, M. Khursheed, Hafiz Sabir Basheer, M. Imran, Hamza Abdul Wahab, Atif Sajjad, Asad Razzaq, M. Nasir,Shahzad Ahmad, Asif Shahzad, Mudassar Hasnain, Jamshed Khan, Faheem Abbasi, M. Habib Sarwar, M. Usman, ZZZZ, who join us for their study and that was the time we were compiling the book in our mind. We would also like to thank our reviewers, XXXX. XXXX not only made sure that the information presented in this book was technically correct, but also that the information was understandable to those new to data structure. I'd like to offer my sincere, heartfelt thanks to everyone who helped Grant and me to produce this book:
10 XXX extraordinaire for the tremendous job he did in assisting us with sorting out the finer points of Data Structure as my primary technical reviewer. To XXX, for being fun to work with and XXXX for the wonderful comments and insights they provided us on our book. XXX is a true computer guru who has probably forgotten more about programming than I will ever know. Rana Sarfraz Nasir, Rao Muhammad Iqbal, Qamar Saeed, Hamid Khan and Rana Iqrar Hussain helped us morally throughout the manuscript of this book. XXXX created a number of the illustrations and improved the others. XXXX provided support and resources, and we are grateful. A special thanks you to XXX, who added great value to this book. If this book is clear and understandable, it is due to her vigilance. And, in saving the best for last, a special note of thanks and appreciation to, XXX, who has been involved in this work from the start and provided loving support every step of the way. From endless readings and corrections of the manuscript to warm encouragement, you and your efforts are sincerely appreciated. It couldn't have done it without you. Ghulam Gilanie Janjua M. Phil (Computer Science)
11 Table of Contents TOPIC PAGE NO CHAPTER NO 1 Understanding the Environment What is data? 1 What is information? 1 About which data is to be collected Data type Built in data types 2 Programmer define data types 3 What is data structure? 3 Example of data structure 3 Common operations of data structure 4 Inserting 4 Deleting 4 Updating 4 Transversing 4 Searching 4 Sorting 5 Splitting 5 Merging 5 Types of data structure 5 A primitive data structure 5 A non primitive data structure 5 Physical data structures 5 Logical data structures 6 Static data structures 6 Dynamic data structures 6 Linear data structures 7 Non-linear data structures 7 Contiguous data structures 8 Non contiguous data structures 8 Implementation of data structures in this book 9 General Syntax of Algorithm used though out this book 9
12 CHAPTER NO 2 Decisions Terms used for array 3 Base Address 3 Memory bytes allocated w.r.t Data Types 3 Examples of Array in computer science 4 Types of Array 5 One dimensional array 5 Memory representation of the array 5 Operations on One Dimensional Array 6 Insertion 6 Algorithm for insertion 8 C++ Code for insertion 9 Traversing 10 Algorithm for Traversing 10 C++ Code for Traversing 11 Searching 12 Equential Searches 12 Algorithm for Linear Search 13 C++ Code for Linear Search 14 Binary Search 15 Algorithm for Binary Search 16 C++ Code for Binary Search 18 Sorting 19 Bubble Sort 20 Algorithm for Bubble Sort 23 C++ Code for Bubble Sort 24 Selection Sort 25 Algorithm for Selection Sort 28 C++ Code for Selection Sort 30 CHAPTER NO 3
13 Loops Loop 1 Parts of Loop 1 Types of Loops in C 1 while Loop 1 break Statement 13 continue Statement 14 Sentinel Control Loop 15 do-while Loop 16 for Loop 19 Infinite Loops 22 When to use whose loop? 22 Nested loops 23 Points to be noted 29 Exercise 29 CHAPTER NO 4 Modular Structure Function 1 Types of Function 1 Ingredients of Function 1 Arguments 1 Parameters 1 Return Value 1 Signature of a Function 2 Advantages of Using Function 4 Returning More Values from Function 6 Pass by Value 6 Pass by Reference 7 Reference 8 Pointers 11 Some Important Points about Pointers 14 sizeof Operator 15 Pass by address 18
14 Default/Optional Arguments 20 Function Overloading 21 Macros 22 Passing variable number of arguments 24 Storage classes in C 25 Local and Global variables 25 Automatic variables 26 register variables 27 External variables 27 static variables 29 Recursion 30 Infinite recursive function 30 Finite recursive function 31 File include mechanism 36 Points to be noted 38 Exercise 39 CHAPTER NO 5 Arrays Array 1 Ingredients of an array 2 One dimensional array 2 Multidimensional array 2 Declaration of array variables 2 Memory representation of array variable 2 Initialization of array 2 Input of array 3 Sorting of one dimensional array 7 Bubble Sort 8 Selection Sort 10 Passing one dimensional array into function 12 Searching from one dimensional array 13 Liner Search 13 Binary search 14
15 Pointers to one dimensional array 16 Two dimensional arrays 18 Input/output into/from 2-D array 18 Passing 2-D array into function 20 Pointers to 2-D arrays 26 Array of pointers 27 Points to be noted 29 Exercise 29 CHAPTER NO 6 String String 1 Examples of string data 1 Declaration of string 1 Initialization of string 1 Built in String Functions 6 strlen 7 Passing string to function 7 strlwr 9 strupr 10 strcat 11 strcpy 12 strrev 13 2-D array of characters 16 Declaration of 2-D array of character 16 Initialization of 2-D array 16 Arrays of Pointers to String 21 Advantages of Pointers of 2-D Arrays of Characters 22 Disadvantages of 2-D array of pointers 23 Points to be noted 27 Exercise 27 CHAPTER NO 7 Collection of data types
16 Structure 1 Structure Definition 1 Declaring structure variables 1 Unnamed structure 2 Initialization of Structure Variable 2 How can we access the members of structure? 3 Input Into Structure Variable 4 Array of structure 5 Features of structure 5 Nested structured 7 Pointer to Structure 8 Structures Can be Passed to Functions Like Ordinary Variables 8 Returning Structure Variable From Function 10 union 12 enum 15 typedef 17 Bit fields 19 What are bits? 20 Units of Digital Storage 20 Bitwise operators 22 One s complement (~) operator 22 Right shift (>>) operator 23 Left shift (<<) operator 25 Bitwise & (AND) operator 26 Uses of bitwise & (AND) operator 26 Bitwise (OR) operator 28 Uses of bitwise (OR) operator 28 Bitwise ^ (XOR) operator 29 Uses of Bitwise ^ (XOR) operator 29 Practical uses of Right Shift >> and Left Shift << Bitwise Operators 30 Points to be Noted 33 Exercise 33 CHAPTER NO 8 Input & Output
17 Formatted I/O functions 1 Unformatted I/O functions 1 Table of the all I/O functions 2 Console I/O functions 3 Practical use of sprintf() and sscanf() 4 Disk I/O functions 6 Opening a file 7 Different file opening modes 7 Reading character from file 8 Closing the file 8 Detecting end of file 8 Command line arguments 10 I/O of strings to and from files 13 Reading back formatted data from file 15 Standard Pre-Defined Pointers 16 Redirection of Input and Output in DOS Kingdom 21 Redirection of output 21 Redirection of Input 22 Redirection of both Input and output 22 Binary I/O functions 23 Use of fread() and fwrite() functions 24 Uses of fseek(), ftell() and rewind() functions 26 Error Handling in Reading/Writing 26 Low Level Disk I/O 27 read() and write() functions 29 Exercise 31 CHAPTER NO 9 Built-in-Functions
18 Arithmetic functions 1 floor() function and ceil() function 2 fmod() function and modf() function 3 Character Identification functions 4 Searching and Sorting Functions 4 bsearch() function 4 qsort() function 5 File Handling Functions 6 remove () function 6 rename () function 6 Directory Control Functions 7 mkdir() function and rmdir() function 7 system() function 7 Buffer Manipulation Functions 8 memset() function 8 Disk I/O Functions 9 getdisk() and setdisk() functions 9 Memory Allocation Functions 10 malloc () function 11 calloc() function 12 Small Data Models 13 Large Data Models 13 Process Control Functions 14 atexit() function 14 Graphics Functions 15 Time Related Functions 16 getdate() and gettime() functions 16 DOS Interface Functions 17 Miscellaneous Functions 18 random macro 18 randomize macro 18 srand macro 19 All Header Files available in C 20 CHAPTER NO 10 Number System
19 Binary Number System 1 Octal Number System 1 Decimal Number system 1 Hexadecimal Number System 1 Number System Conversion 2 Conversion of decimal to others 2 Decimal to binary 2 Decimal to Octal 3 Decimal to Hexadecimal 3 Conversion from Others to Decimal 4 Binary to Decimal 4 Octal to Decimal 4 Decimal to Hexadecimal 4 Direct Methods for Conversions 4 Conversion of floating point value 8 Conversion of decimal to others 8 Conversion of Decimal to Binary 8 Conversion of Decimal to Octal 9 Conversion of Decimal to Hexadecimal 9 Conversion from other floating point number system to decimal 9 Conversion of Binary to Decimal 9 Conversion of Octal to Decimal 10 Conversion of Hexadecimal to Decimal 10 Examples of number system conversion 11
C & Data Structures syllabus
syllabus Overview: C language which is considered the mother of all languages, is and will be the most sought after programming language for any beginner to jump start his career in software development.
More informationWriting an ANSI C Program Getting Ready to Program A First Program Variables, Expressions, and Assignments Initialization The Use of #define and
Writing an ANSI C Program Getting Ready to Program A First Program Variables, Expressions, and Assignments Initialization The Use of #define and #include The Use of printf() and scanf() The Use of printf()
More informationContents. Preface. Introduction. Introduction to C Programming
c11fptoc.fm Page vii Saturday, March 23, 2013 4:15 PM Preface xv 1 Introduction 1 1.1 1.2 1.3 1.4 1.5 Introduction The C Programming Language C Standard Library C++ and Other C-Based Languages Typical
More informationC Programming. Course Outline. C Programming. Code: MBD101. Duration: 10 Hours. Prerequisites:
C Programming Code: MBD101 Duration: 10 Hours Prerequisites: You are a computer science Professional/ graduate student You can execute Linux/UNIX commands You know how to use a text-editing tool You should
More informationAbout Codefrux While the current trends around the world are based on the internet, mobile and its applications, we try to make the most out of it. As for us, we are a well established IT professionals
More informationPractical C++ Programming
SECOND EDITION Practical C++ Programming Steve Oualline O'REILLY' Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo Preface xv Part I. The Basics 1. What Is C++? 3 A Brief History of C++ 3 C++
More informationThe Waite Group's. New. Primer Plus. Second Edition. Mitchell Waite and Stephen Prata SAMS
The Waite Group's New Primer Plus Second Edition Mitchell Waite and Stephen Prata SAMS PUBLISHING A Division of Prentice Hall Computer Publishing 11711 North College, Carmel, Indiana 46032 USA Contents
More informationDEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING UNIT-1
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Year & Semester : I / II Section : CSE - 1 & 2 Subject Code : CS6202 Subject Name : Programming and Data Structures-I Degree & Branch : B.E C.S.E. 2 MARK
More informationKLiC C. About. Tools: Turbo C++ Syllabus:
KLiC C About C is basic programming language in which you can program easily and develop effective applications, games etc. This course is split up into several sections, lessons, and Exercises for you
More informationSample Copy. Not For Distribution.
Computer System and Programming in C i Publishing-in-support-of, EDUCREATION PUBLISHING RZ 94, Sector - 6, Dwarka, New Delhi - 110075 Shubham Vihar, Mangla, Bilaspur, Chhattisgarh - 495001 Website: www.educreation.in
More informationAryan College. Fundamental of C Programming. Unit I: Q1. What will be the value of the following expression? (2017) A + 9
Fundamental of C Programming Unit I: Q1. What will be the value of the following expression? (2017) A + 9 Q2. Write down the C statement to calculate percentage where three subjects English, hindi, maths
More informationKLiC C Programming. (KLiC Certificate in C Programming)
KLiC C Programming (KLiC Certificate in C Programming) Turbo C Skills: The C Character Set, Constants, Variables and Keywords, Types of C Constants, Types of C Variables, C Keywords, Receiving Input, Integer
More informationVALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANGULATHUR
VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANGULATHUR 603 203 FIRST SEMESTER B.E / B.Tech., (Common to all Branches) QUESTION BANK - GE 6151 COMPUTER PROGRAMMING UNIT I - INTRODUCTION Generation and
More informationPreface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS
Contents Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS 1.1. INTRODUCTION TO COMPUTERS... 1 1.2. HISTORY OF C & C++... 3 1.3. DESIGN, DEVELOPMENT AND EXECUTION OF A PROGRAM... 3 1.4 TESTING OF PROGRAMS...
More informationThe Foundation of C++: The C Subset An Overview of C p. 3 The Origins and History of C p. 4 C Is a Middle-Level Language p. 5 C Is a Structured
Introduction p. xxix The Foundation of C++: The C Subset An Overview of C p. 3 The Origins and History of C p. 4 C Is a Middle-Level Language p. 5 C Is a Structured Language p. 6 C Is a Programmer's Language
More informationLong Questions. 7. How does union help in storing the values? How it differs from structure?
Long Questions April/May - 2010 Marks 1. Explain arithmetic operators and their precedence in C. 2. Explain the term structured programming with help of example 3. Write a program to read 10 numbers and
More informationModel Viva Questions for Programming in C lab
Model Viva Questions for Programming in C lab Title of the Practical: Assignment to prepare general algorithms and flow chart. Q1: What is a flowchart? A1: A flowchart is a diagram that shows a continuous
More informationDETAILED SYLLABUS INTRODUCTION TO C LANGUAGE
COURSE TITLE C LANGUAGE DETAILED SYLLABUS SR.NO NAME OF CHAPTERS & DETAILS HOURS ALLOTTED 1 INTRODUCTION TO C LANGUAGE About C Language Advantages of C Language Disadvantages of C Language A Sample Program
More informationCode No: R Set No. 1
Code No: R05010106 Set No. 1 1. (a) Draw a Flowchart for the following The average score for 3 tests has to be greater than 80 for a candidate to qualify for the interview. Representing the conditional
More informationPractical C Programming. Steve Oualline
Practical C Programming Steve Oualline Preface Scope of This Handbook Conventions Used in This Handbook Acknowledgments xviii xix xx i xxii Chapter 1 The Basics of Program Writing 1 Text Editor 2 Compiler
More informationM1-R4: Programing and Problem Solving using C (JULY 2018)
M1-R4: Programing and Problem Solving using C (JULY 2018) Max Marks: 100 M1-R4-07-18 DURATION: 03 Hrs 1. Each question below gives a multiple choice of answers. Choose the most appropriate one and enter
More informationC-LANGUAGE CURRICULAM
C-LANGUAGE CURRICULAM Duration: 2 Months. 1. Introducing C 1.1 History of C Origin Standardization C-Based Languages 1.2 Strengths and Weaknesses Of C Strengths Weaknesses Effective Use of C 2. C Fundamentals
More informationComputer Programming C++ (wg) CCOs
Computer Programming C++ (wg) CCOs I. The student will analyze the different systems, and languages of the computer. (SM 1.4, 3.1, 3.4, 3.6) II. The student will write, compile, link and run a simple C++
More informationUNIT I : OVERVIEW OF COMPUTERS AND C-PROGRAMMING
SIDDARTHA INSTITUTE OF SCIENCE AND TECHNOLOGY:: PUTTUR Siddharth Nagar, Narayanavanam Road 517583 QUESTION BANK (DESCRIPTIVE) Subject with Code : PROGRAMMING FOR PROBLEM SOLVING (18CS0501) Course & Branch
More informationAFN-1255 PCA131 P.G.D.C.A. DIPLOMA EXAMINATION, MAY 2011 First Semester Computer Applications FUNDAMENTALS OF DIGITAL COMPUTER (Non-CBCS 2004 onwards) Time : 3 Hours Maximum : 100 Marks Part A (15 1 =
More informationCourse Title: C Programming Full Marks: Course no: CSC110 Pass Marks: Nature of course: Theory + Lab Credit hours: 3
Detailed Syllabus : Course Title: C Programming Full Marks: 60+20+20 Course no: CSC110 Pass Marks: 24+8+8 Nature of course: Theory + Lab Credit hours: 3 Course Description: This course covers the concepts
More informationCIS 1.5 Course Objectives. a. Understand the concept of a program (i.e., a computer following a series of instructions)
By the end of this course, students should CIS 1.5 Course Objectives a. Understand the concept of a program (i.e., a computer following a series of instructions) b. Understand the concept of a variable
More informationDR. A.P.J. ABDUL KALAM TECHNICAL UNIVERSITY LUCKNOW. Evaluation Scheme & Syllabus. For. B.Tech. First Year (Programming for Problem Solving)
DR. A.P.J. ABDUL KALAM TECHNICAL UNIVERSITY LUCKNOW Evaluation Scheme & Syllabus For B.Tech. First Year (Programming for Problem Solving) On Choice Based Credit System (Effective from the Session: 2018-19)
More informationSAURASHTRA UNIVERSITY
SAURASHTRA UNIVERSITY RAJKOT INDIA Accredited Grade A by NAAC (CGPA 3.05) CURRICULAM FOR B.Sc. (Computer Science) Bachelor of Science (Computer Science) (Semester - 1 Semester - 2) Effective From June
More informationAppendices E through H are PDF documents posted online at the book s Companion Website (located at
chtp7_printonlytoc.fm Page vii Monday, January 23, 2012 1:30 PM Appendices E through H are PDF documents posted online at the book s Companion Website (located at www.pearsonhighered.com/deitel). Preface
More information(i) Describe in detail about the classification of computers with their features and limitations(10)
UNIT I - INTRODUCTION Generation and Classification of Computers- Basic Organization of a Computer Number System Binary Decimal Conversion Problems. Need for logical analysis and thinking Algorithm Pseudo
More informationPESIT-BSC Department of Science & Humanities
LESSON PLAN 15PCD13/23 PROGRAMMING IN C AND DATA Course objectives: STRUCTURES The objective of this course is to make students to learn basic principles of Problem solving, implementing through C programming
More informationC mini reference. 5 Binary numbers 12
C mini reference Contents 1 Input/Output: stdio.h 2 1.1 int printf ( const char * format,... );......................... 2 1.2 int scanf ( const char * format,... );.......................... 2 1.3 char
More information1 P a g e A r y a n C o l l e g e \ B S c _ I T \ C \
BSc IT C Programming (2013-2017) Unit I Q1. What do you understand by type conversion? (2013) Q2. Why we need different data types? (2013) Q3 What is the output of the following (2013) main() Printf( %d,
More informationC Programming SYLLABUS COVERAGE SYLLABUS IN DETAILS
C Programming C SYLLABUS COVERAGE Introduction to Programming Fundamentals in C Operators and Expressions Data types Input-Output Library Functions Control statements Function Storage class Pointer Pointer
More informationSyllabus for Computer Science General Part I
Distribution of Questions: Part I Q1. (Compulsory: 20 marks). Any ten questions to be answered out of fifteen questions, each carrying two marks (Group A 3 questions, Group B, Group C and Group D 4 questions
More informationCSCI 171 Chapter Outlines
Contents CSCI 171 Chapter 1 Overview... 2 CSCI 171 Chapter 2 Programming Components... 3 CSCI 171 Chapter 3 (Sections 1 4) Selection Structures... 5 CSCI 171 Chapter 3 (Sections 5 & 6) Iteration Structures
More informationWeek Day Topic Sub Topic Type Hours Pre-Evaluation Experience Collection & Demographics Online 2 OOPS concepts 1
Curriculum : C (10 weeks) Week Day Topic Sub Topic Type Hours Pre-Evaluation Experience Collection & Demographics Online 2 OOPS concepts 1 Pre-Evaluation Problem Solving skills Online Assessment 2 Computer
More informationTexas Instruments Technical Questions and Answers
Texas Instruments Technical Questions and Answers Q1. How do I write code to retrieve current date and time from the system and display it as a string? Use time( ) function to get current date and time
More informationBIRLA INSTITUTE OF TECHNOLOGY AND SCIENCE, Pilani Pilani Campus Instruction Division. SECOND SEMESTER Course Handout Part II
SECOND SEMESTER 2016-2017 Course Handout Part II In addition to part-i (General Handout for all courses appended to the time table) this portion gives further specific details regarding the course. Course
More informationCHAPTER 1 Introduction to Computers and Programming CHAPTER 2 Introduction to C++ ( Hexadecimal 0xF4 and Octal literals 031) cout Object
CHAPTER 1 Introduction to Computers and Programming 1 1.1 Why Program? 1 1.2 Computer Systems: Hardware and Software 2 1.3 Programs and Programming Languages 8 1.4 What is a Program Made of? 14 1.5 Input,
More informationName :. Roll No. :... Invigilator s Signature :.. CS/B.TECH (NEW)/SEM-2/CS-201/ BASIC COMPUTATION & PRINCIPLES OF COMPUTER PROGRAMMING
Name :. Roll No. :..... Invigilator s Signature :.. CS/B.TECH (NEW)/SEM-2/CS-201/2012 2012 BASIC COMPUTATION & PRINCIPLES OF COMPUTER PROGRAMMING Time Allotted : 3 Hours Full Marks : 70 The figures in
More informationContents. 1 Introduction to Computers, the Internet and the World Wide Web 1. 2 Introduction to C Programming 26
Preface xix 1 Introduction to Computers, the Internet and the World Wide Web 1 1.1 Introduction 2 1.2 What Is a Computer? 4 1.3 Computer Organization 4 1.4 Evolution of Operating Systems 5 1.5 Personal,
More informationCNG 140 C Programming. Syllabus. Course Info Fall Semester. Catalog Description
CNG 140 C Programming 2012-2013 Fall Semester Syllabus Course Info Catalog Description Advanced programming with C: Storage and control structures, recursion and programming with dynamic data structures.
More informationQuiz 0 Review Session. October 13th, 2014
Quiz 0 Review Session October 13th, 2014 Topics (non-exhaustive) Binary. ASCII. Algorithms. Pseudocode. Source code. Compiler. Object code. Scratch. Statements. Boolean expressions. Conditions. Loops.
More informationImportant Questions for Viva CPU
Important Questions for Viva CPU 1. List various components of a computer system. i. Input Unit ii. Output Unit iii. Central processing unit (Control Unit + Arithmetic and Logical Unit) iv. Storage Unit
More informationENEE 150: Intermediate Programming Concepts for Engineers Spring 2018 Handout #27. Midterm #2 Review
ENEE 150: Intermediate Programming Concepts for Engineers Spring 2018 Handout #27 Midterm #2 Review 1 Time and Location The midterm will be given in class during normal class hours, 11:00a.m.-12:15p.m.,
More informationM4.1-R3: PROGRAMMING AND PROBLEM SOLVING THROUGH C LANGUAGE
M4.1-R3: PROGRAMMING AND PROBLEM SOLVING THROUGH C LANGUAGE NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions. 2. PART ONE is to be
More informationJava Fundamentals p. 1 The Origins of Java p. 2 How Java Relates to C and C++ p. 3 How Java Relates to C# p. 4 Java's Contribution to the Internet p.
Preface p. xix Java Fundamentals p. 1 The Origins of Java p. 2 How Java Relates to C and C++ p. 3 How Java Relates to C# p. 4 Java's Contribution to the Internet p. 5 Java Applets and Applications p. 5
More informationAbout Codefrux While the current trends around the world are based on the internet, mobile and its applications, we try to make the most out of it. As for us, we are a well established IT professionals
More informationCS 326 Operating Systems C Programming. Greg Benson Department of Computer Science University of San Francisco
CS 326 Operating Systems C Programming Greg Benson Department of Computer Science University of San Francisco Why C? Fast (good optimizing compilers) Not too high-level (Java, Python, Lisp) Not too low-level
More informationCS Programming In C
CS 24000 - Programming In C Week Two: Basic C Program Organization and Data Types Zhiyuan Li Department of Computer Science Purdue University, USA 2 int main() { } return 0; The Simplest C Program C programs
More informationCome and join us at WebLyceum
Come and join us at WebLyceum For Past Papers, Quiz, Assignments, GDBs, Video Lectures etc Go to http://www.weblyceum.com and click Register In Case of any Problem Contact Administrators Rana Muhammad
More informationMPATE-GE 2618: C Programming for Music Technology. Syllabus
MPATE-GE 2618: C Programming for Music Technology Instructor Dr. Schuyler Quackenbush schuyler.quackenbush@nyu.edu Lab Teaching Assistant TBD Description Syllabus MPATE-GE 2618: C Programming for Music
More informationReg. No. : Question Paper Code : 27157
WK 3 Reg. No. : Question Paper Code : 27157 B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER 2015. Time : Three hours Second Semester Computer Science and Engineering CS 6202 PROGRAMMING AND DATA STRUCTURES
More informationOUTCOMES BASED LEARNING MATRIX
OUTCOMES BASED LEARNING MATRIX Course: CTIM 372 Advanced Programming in C++ Department: Computer Technology and Information Management 3 credits/4 contact hours Description: This course is a continuation
More informationIntroduction to Programming Using Java (98-388)
Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;
More information1 Chapter Plan...1 Exercise - Simple Program...2
Chapter 1: Introduction Exercise - Simple Program...2 2 Subject Matter...4 1. What is PL/1?...4 2. PL/1: Strengths and Advantages...5 3. Program Structure...6 4. Data Types...7 5. Built-in Functions...8
More informationMultiple Choice Questions ( 1 mark)
Multiple Choice Questions ( 1 mark) Unit-1 1. is a step by step approach to solve any problem.. a) Process b) Programming Language c) Algorithm d) Compiler 2. The process of walking through a program s
More informationUNIT IV-2. The I/O library functions can be classified into two broad categories:
UNIT IV-2 6.0 INTRODUCTION Reading, processing and writing of data are the three essential functions of a computer program. Most programs take some data as input and display the processed data, often known
More informationDEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING B.E SECOND SEMESTER CS 6202 PROGRAMMING AND DATA STRUCTURES I TWO MARKS UNIT I- 2 MARKS
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING B.E SECOND SEMESTER CS 6202 PROGRAMMING AND DATA STRUCTURES I TWO MARKS UNIT I- 2 MARKS 1. Define global declaration? The variables that are used in more
More information[CHAPTER] 1 INTRODUCTION 1
FM_TOC C7817 47493 1/28/11 9:29 AM Page iii Table of Contents [CHAPTER] 1 INTRODUCTION 1 1.1 Two Fundamental Ideas of Computer Science: Algorithms and Information Processing...2 1.1.1 Algorithms...2 1.1.2
More informationSoftware Development & Education Center C Programming
Software Development & Education Center C Programming Detailed Curriculum History of C Features of C Requirement from C development Turbo C 3 Turbo C 45 Borland C++ 502 Rules for C Programming Writing
More informationFUNDAMENTALS OF COMPUTER PROGRAMMING AND IT
FUNDAMENTALS OF COMPUTER PROGRAMMING AND IT SALIENT FEATURES OF THE PRESENT EDITION Motivates the unmotivated and provides the teachers an unequaled approach that allows them to teach students with a disparity
More informationPERIYAR CENTENARY POLYTECHNIC COLLEGE Periyar Nagar- Vallam Thanjavur
PERIYAR CENTENARY POLYTECHNIC COLLEGE Periyar Nagar- Vallam-613 403 Thanjavur 01. Define program? 02. What is program development cycle? 03. What is a programming language? 04. Define algorithm? 05. What
More informationGARDEN CITY UNIVERSITY. Bachelor of Computer Applications SEMESTER- I. Course: CONCEPTS OF PROGRAMMING USING C LANGUAGE CODE: 05ABCAR17111 CREDITS: 04
GARDEN CITY UNIVERSITY Bachelor of Computer Applications SEMESTER- I Course: CONCEPTS OF PROGRAMMING USING C LANGUAGE CODE: 05ABCAR17111 CREDITS: 04 Unit 1 Programming Basics 1.1 Introduction to Programming
More informationA flow chart is a graphical or symbolic representation of a process.
Q1. Define Algorithm with example? Answer:- A sequential solution of any program that written in human language, called algorithm. Algorithm is first step of the solution process, after the analysis of
More informationBIRLA INSTITUTE OF TECHNOLOGY AND SCIENCE, Pilani Pilani Campus Instruction Division. SECOND SEMESTER Course Handout Part II
SECOND SEMESTER 2014-2015 Course Handout Part II In addition to part-i (General Handout for all courses appended to the time table) this portion gives further specific details regarding the course. LEGENDS
More informationCourse Text. Course Description. Course Objectives. StraighterLine Introduction to Programming in C++
Introduction to Programming in C++ Course Text Programming in C++, Zyante, Fall 2013 edition. Course book provided along with the course. Course Description This course introduces programming in C++ and
More informationQuestions Bank. 14) State any four advantages of using flow-chart
Questions Bank Sub:PIC(22228) Course Code:-EJ-2I ----------------------------------------------------------------------------------------------- Chapter:-1 (Overview of C Programming)(10 Marks) 1) State
More informationSyllabus For F. Y. B. Sc. Semester 1 Core Paper No.: 102 Core Paper Title: Programming in C I 1. Algorithm & Flowcharting 2. Programming Languages & S
Syllabus For F. Y. B. Sc. Semester 1 Core Paper No.: 101 Core Paper Title: Fundamentals of Computer I 1. Computer Fundamentals 1.1. History, Characteristics and Generation of Computers. 1.2. Classification
More informationB.V. Patel Institute of Business Management, Computer & Information Technology, Uka Tarsadia University
Unit 1 Programming Language and Overview of C 1. State whether the following statements are true or false. a. Every line in a C program should end with a semicolon. b. In C language lowercase letters are
More informationModel Viva Questions for Programming in C lab
Model Viva Questions for Programming in C lab Common to: CSE 2 nd sem IT 2 nd sem Title of the Practical: Assignment to prepare general algorithms and flow chart. Q1: What is a flowchart? A1: A flowchart
More informationBLM2031 Structured Programming. Zeyneb KURT
BLM2031 Structured Programming Zeyneb KURT 1 Contact Contact info office : D-219 e-mail zeynebkurt@gmail.com, zeyneb@ce.yildiz.edu.tr When to contact e-mail first, take an appointment What to expect help
More informationC - Basics, Bitwise Operator. Zhaoguo Wang
C - Basics, Bitwise Operator Zhaoguo Wang Java is the best language!!! NO! C is the best!!!! Languages C Java Python 1972 1995 2000 (2.0) Procedure Object oriented Procedure & object oriented Compiled
More informationLesson Plan. Week Theory Practical. Lecture Day Topic(including assignment Test) Practical Day
Lesson Plan Name of Faculty: Neha Aggarwal Discipline: BCA Semester: 2nd Subject: Office Automation Tools(BCA-124) Lesson Plan Duration: 15 Weeks Workload (Lecture) Per Week: 4 Lecture,4 Practical Per
More informationStudent Name: (in Capital Letters) CSE Introduction to Programming for Engineers and Scientists. Final Exam
Student Name: (in Capital Letters) CSE 1311 Introduction to Programming for Engineers and Scientists Final Exam Fall 2013 1 1. If count is a properly defined integer variable, the following piece of code:
More informationCS201- Introduction to Programming Latest Solved Mcqs from Midterm Papers May 07,2011. MIDTERM EXAMINATION Spring 2010
CS201- Introduction to Programming Latest Solved Mcqs from Midterm Papers May 07,2011 Lectures 1-22 Moaaz Siddiq Asad Ali Latest Mcqs MIDTERM EXAMINATION Spring 2010 Question No: 1 ( Marks: 1 ) - Please
More informationSTRUCTURE AND SYLLABUS APPROVED IN THE BOARD OF STUDIES MEETING ON 2001 TO BE EFFECTIVE FROM THE ACADEMIC YEAR
STRUCTURE AND SYLLABUS APPROVED IN THE BOARD OF STUDIES MEETING ON 2001 TO BE EFFECTIVE FROM THE ACADEMIC YEAR 2000-2001. MCA II SEMESTER Scheme of Evaluation Max. Marks Min. Marks to pass L P C Int. Ext.
More informationAppendix A Developing a C Program on the UNIX system
Appendix A Developing a C Program on the UNIX system 1. Key in and save the program using vi - see Appendix B - (or some other editor) - ensure that you give the program file a name ending with.c - to
More informationA Fast Review of C Essentials Part I
A Fast Review of C Essentials Part I Structural Programming by Z. Cihan TAYSI Outline Program development C Essentials Functions Variables & constants Names Formatting Comments Preprocessor Data types
More informationKadi Sarva Vishwavidyalaya, Gandhinagar
Kadi Sarva Vishwavidyalaya, Gandhinagar MASTERS OF COMPUTER APPLICATION (MCA) Semester I (First Year) Subject: MCA-101 Programming for Logic Building (LDPL) SUB Teaching scheme Examination scheme Total
More informationNumber Systems for Computers. Outline of Introduction. Binary, Octal and Hexadecimal numbers. Issues for Binary Representation of Numbers
Outline of Introduction Administrivia What is computer architecture? What do computers do? Representing high level things in binary Data objects: integers, decimals, characters, etc. Memory locations (We
More informationFundamental Data Types. CSE 130: Introduction to Programming in C Stony Brook University
Fundamental Data Types CSE 130: Introduction to Programming in C Stony Brook University Program Organization in C The C System C consists of several parts: The C language The preprocessor The compiler
More informationSUBJECT COMPUTER SCIENCE PAGE 1
BACHELOR OF SCIENCE (B.Sc.) (THREE YEAR DEGREE COURSE) SUBJECT COMPUTER SCIENCE PAGE 1 COURSE STRUCTURE FIRST YEAR PAPER 101: Computer Fundamental 50 MARKS PAPER 102: Programming IN C 50 MARKS PAPER 103:
More informationLibrary Functions. General Questions
1 Library Functions General Questions 1. What will the function rewind() do? A. Reposition the file pointer to a character reverse. B. Reposition the file pointer stream to end of file. C. Reposition the
More informationName: Prof. Dr. Iftikhar Hussain. Designation: Vice Chancellor. Department: Industrial Engineering. Specialization: Flexible Manufacturing Systems
Name: Prof. Dr. Iftikhar Hussain Designation: Vice Chancellor Department: Industrial Engineering Specialization: Flexible Manufacturing Systems Email: iftikhar@uetpeshawar.edu.pk Area of Interest: Design,
More informationReview of the C Programming Language for Principles of Operating Systems
Review of the C Programming Language for Principles of Operating Systems Prof. James L. Frankel Harvard University Version of 7:26 PM 4-Sep-2018 Copyright 2018, 2016, 2015 James L. Frankel. All rights
More informationAbsolute C++ Walter Savitch
Absolute C++ sixth edition Walter Savitch Global edition This page intentionally left blank Absolute C++, Global Edition Cover Title Page Copyright Page Preface Acknowledgments Brief Contents Contents
More informationC for Electronic Engineering
C for Electronic Engineering with applied software engineering William Buchanan Prentice Hall London New York Toronto Sydney Tokyo Singapore Madrid Mexico City Munich CONTENTS PREFACE 1 INTRODUCTION 1.1
More informationDHANALAKSHMI SRINIVASAN INSTITUTE OF RESEARCH AND TECHNOLOGY SIRUVACHUR, PERAMBALUR DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
DHANALAKSHMI SRINIVASAN INSTITUTE OF RESEARCH AND TECHNOLOGY SIRUVACHUR, PERAMBALUR-621113 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING GE6151 COMPUTER PROGRAMMING PART A (2 MARKS QUESTION WITH ANSWERS)
More informationTentative Teaching Plan Department of Software Engineering Name of Teacher Dr. Naeem Ahmed Mahoto Course Name Computer Programming
Mehran University of Engineering Technology, Jamshoro FRM-003/00/QSP-004 Dec, 01, 2001 Tentative Teaching Plan Department of Software Engineering Name of Teacher Dr. Naeem Ahmed Mahoto Course Name Computer
More informationProgramming Fundamentals - A Modular Structured Approach using C++ By: Kenneth Leroy Busbee
1 0 1 0 Foundation Topics 1 0 Chapter 1 - Introduction to Programming 1 1 Systems Development Life Cycle N/A N/A N/A N/A N/A N/A 1-8 12-13 1 2 Bloodshed Dev-C++ 5 Compiler/IDE N/A N/A N/A N/A N/A N/A N/A
More informationStandard C Library Functions
Demo lecture slides Although I will not usually give slides for demo lectures, the first two demo lectures involve practice with things which you should really know from G51PRG Since I covered much of
More informationSU 2017 May 11/16 LAB 2: Character and integer literals, number systems, character arrays manipulation, relational operator
SU 2017 May 11/16 LAB 2: Character and integer literals, number systems, character arrays manipulation, relational operator 0 Problem 0 number bases Visit the website www.cleavebooks.co.uk/scol/calnumba.htm
More informationBorland 105, 278, 361, 1135 Bounded array Branch instruction 7 break statement 170 BTree 873 Building a project 117 Built in data types 126
INDEX = (assignment operator) 130, 816 = 0 (as function definition) 827 == (equality test operator) 146! (logical NOT operator) 159!= (inequality test operator) 146 #define 140, 158 #include 100, 112,
More informationEMBEDDED Systems. Functions. MODULE- 1 C programming with data Structure Introduction to C. Array and String. Control Flow Statements In C
EMBEDDED Systems MODULE- 1 C with data Structure Introduction to C Objectives of C Applications of C Relational and logical operators Bit wise operators The assignment statement Intermixing of data types
More informationWelcome to Teach Yourself Acknowledgments Fundamental C++ Programming p. 2 An Introduction to C++ p. 4 A Brief History of C++ p.
Welcome to Teach Yourself p. viii Acknowledgments p. xv Fundamental C++ Programming p. 2 An Introduction to C++ p. 4 A Brief History of C++ p. 6 Standard C++: A Programming Language and a Library p. 8
More informationCERTIFICATE IN WEB PROGRAMMING
COURSE DURATION: 6 MONTHS CONTENTS : CERTIFICATE IN WEB PROGRAMMING 1. PROGRAMMING IN C and C++ Language 2. HTML/CSS and JavaScript 3. PHP and MySQL 4. Project on Development of Web Application 1. PROGRAMMING
More informationTEXT FILE I/O. printf("this data will be written to the screen.\n"); printf("x = %d, y = %f\n", x, y);
Text File I/O TEXT FILE I/O Basic text file I/O is only slightly more difficult than the I/O done to date. Every I/O function seen so far has a sister function that will read/write to a file on disk. The
More information