The Waite Group's. New. Primer Plus. Second Edition. Mitchell Waite and Stephen Prata SAMS

Size: px
Start display at page:

Download "The Waite Group's. New. Primer Plus. Second Edition. Mitchell Waite and Stephen Prata SAMS"

Transcription

1 The Waite Group's New Primer Plus Second Edition Mitchell Waite and Stephen Prata SAMS PUBLISHING A Division of Prentice Hall Computer Publishing North College, Carmel, Indiana USA

2 Contents 1 Getting Ready 1 Whence С? 2 Why С? 2 Design Features 2 Efficiency 2 Portability '. 2 You Can Take С Home 3 Power and Flexibility 3 Programmer Oriented 4 Shortcomings 4 Whither C? 4 Using C: Seven Steps 6 Step 1: Define the Program Objectives 6 Step 2: Design the Program 6 Step 3: Write the Code 6 Step 4: Compile 7 Step 5: Run the Program 7 Step 6: Test and Debug the Program 8 Step 7: Maintain and Modify the Program 8 Commentary 8 Programming Mechanics 9 Source Code Files 10 Object Code Files, Executable Files, and Libraries 10 Preparing а С Program on a UNIX System 11 Preparing а С Program on an IBM PC 13 Integrated Development Environments (IDEs) 17 Think С 5.0 on the Macintosh 17 Why Compile? 18 Language Standards 18 Some Conventions 19 Typeface 19 Screen Output 19 Input and Output Devices 19 Chapter Summary 20 Review Questions 20 Programming Exercise 20

3 The Waite Group's New Primer Plus 2 Introducing С 23 A Simple Sample of С 24 The Explanation 24 Pass 1: Quick Synopsis 25 Pass 2: Details 27 The Structure of a Simple Program 33 Tips on Making Your Programs Readable 34 Taking Another Step 35 Documentation 35 Multiple Declarations 35 Multiplication 36 Printing Multiple Values 36 While We're at It...Multiple Functions 36 Debugging 38 Syntax Errors 38 Semantic Errors 39 Program State 41 Keywords 41 Chapter Summary 42 Review Questions 42 Programming Exercises 43 3 Data and С 45 A Sample Program 46 What's New in This Program? 47 Data: Variables and Constants 48 Data: Data-Type Keywords 49 Integer Versus Floating-Point Types 50 The Integer 50 The Floating-Point Number 51 С Data Types 52 The int Type 52 Other Integer Types 55 Using Characters: Type char 59 Types float and double 65 Other Types 67 Type Sizes 71 Using Data Types 72 Arguments and Pitfalls 73 One More Example 74 What Happens 74 A Possible Problem 75 Chapter Summary 76 Review Questions 77 VIII Programming Exercises 78

4 Character Strings and Formatted Input/Output 79 Introductory Program 80 Character Strings An Introduction 81 Type char Arrays and the Null Character 81 Using Strings 82 String Length strlen() 83 Constants and the С Preprocessor 85 Using #definean& #includetogether 89 С A Master of Disguise: Creating Aliases 89 Manifest Constants on the Job 91 Exploring and Exploiting printfo and scanf() 91 The printfi) Function 92 Using printfo 93 Conversion Specification Modifiers tot printfo 95 The Meaning of Conversion 101 Using scanf() 107 The * Modifier with printfo and scanfi) 112 Usage Tips 114 Chapter Summary 115 Review Questions 116 Programming Exercises 117 Operators, Expressions, and Statements 119 Introducing Loops 120 Fundamental Operators 122 Assignment Operator: = 122 Addition Operator: Subtraction Operator: 125 Sign Operators: - and Multiplication Operator: * 126 Division Operator: / 128 Operator Precedence 129 Precedence and the Order of Evaluation 131 Some Additional Operators 133 The sizeof Operator 133 Modulus Operator: % 134 Increment and Decrement Operators: ++ and 135 Decrementing: 138 Precedence 139 Don't Be Too Clever 140 Expressions and Statements 141 Expressions 141 Statements 142 Compound Statements (Blocks) 145

5 The Waite Group's New Primer Plus Type Conversions 147 The Cast Operator 149 Function with Arguments 151 K&R Function Declarations and Headings 152 An Example Program 153 Chapter Summary 155 Review Questions 156 Programming Exercises С Control Statements: Looping 159 An Initial Example 160 Program Comments 161 C-Style Reading Loop 162 The while Statement 163 Terminating a ivhilehoop 163 When a Loop Terminates 164 while An Entry-Condition Loop 165 Syntax Points 165 Which Is Bigger: Using Relational Operators and Expressions 167 What Is Truth? 168 What Else Is True? 169 Troubles with Truth 170 Precedence of Relational Operators 172 Indefinite Loops and Counting Loops 174 The for Loop 175 Using for for Flexibility! 177 More Assignment Operators: +=, -=, *=, /=, %= 182 The Comma Operator 183 Zeno Meets the for Loop 185 An Exit-Condition Loop: do while 187 Which Loop? 189 Nested Loops 190 Discussion 191 A Nested Variation 191 Arrays 192 Using ayorloop with an Array 194 A Loop Example Using a Function Return Value 195 Program Discussion 198 Using Functions with Return Values 198 Chapter Summary 199 Review Questions 200 Programming Exercises 202 X

6 Contents 7 С Control Statements: Branching and Jumps 205 The if Statement 206 if Basics 207 Adding else to the if Statement 208 Another Example: Introducing getcbar() and putchar() 209 Multiple Choice: else if 212 Pairing elsewit\\ if. 215 More Nested ifs 216 Let's Get Logical 221 Precedence 223 Order of Evaluation 223 A Word-Count Program 224 The Conditional Operator:?: 227 Loop Aids: continue and break 229 The continue Statement 229 The break Statement 231 Multiple Choice: switch and break 233 Using the switch Statement 235 Reading Only the First Character of a Line 237 Multiple Labels 237 switch and if else 239 The goto Statement 240 Avoiding goto 240 Chapter Summary 244 Review Questions 245 Programming Exercises Character Input/Output and Redirection 249 Single-Character I/O: getchar() and putchar() 250 Buffers 251 Terminating Keyboard Input 253 Files, Streams, and Keyboard Input 253 The End of File 254 Redirection and Files 257 UNIX and DOS Redirection 257 Comment 260 A Graphic Example 261 Creating a Friendlier User Interface 263 Working with Buffered Input 263 Mixing Numeric and Character Input 265 Character Sketches 269 Analyzing the Program 271 Chapter Summary 273 Review Questions 274 Programming Exercises 275 XI

7 The Waite Group's New Primer Plus Functions 277 Review 278 Creating and Using a Simple Function 279 Function Arguments 282 Defining a Function with an Argument: Formal Arguments 284 Prototyping a Function with Arguments 285 Calling a Function with an Argument: Actual Arguments 285 The Black Box Viewpoint 286 Returning a Value from a Function with return 286 Function Types 289 ANSI С Function Prototyping 290 The Problem 290 The ANSI Solution 291 No Arguments and Unspecified Arguments 293 Recursion 293 Recursion Revealed 293 Recursion Fundamentals 295 Tail Recursion 296 Recursion and Reversal 298 All С Functions Are Created Equal 299 Compiling Programs with Two or More Functions 300 UNIX 300 Microsoft С Versions (Command-Line) 300 Microsoft С (PWB) 300 QuickC 301 Turbo C/Borland С 301 Think С 301 Using Header Files 301 Finding Addresses: The & Operator 305 Altering Variables in the Calling Function 306 Pointers: A First Look 308 The Indirection Operator: * 309 Declaring Pointers 310 Using Pointers to Communicate Between Functions 311 Chapter Summary 316 Review Questions 317 Programming Exercises 317 Щ Arrays and Pointers 319 Arrays 320 Initialization and Storage Classes 320 More Array Initialization 322 Assigning Array Values 325 xii

8 Contents Pointers to Arrays 326 Functions, Arrays, and Pointers 329 Array Names as Arguments 330 Using Pointer Arguments 331 Comment: Pointers and Arrays 333 Pointer Operations 333 Another Example 336 Multidimensional Arrays 337 Initializing a Two-Dimensional Array 339 More Dimensions 340 Pointers and Multidimensional Arrays 340 Functions and Multidimensional Arrays 344 Planning a Program 349 General Plan 349 The read_array() Function 350 The sbow_array() Function 351 The mean() Function 352 The Result 352 Chapter Summary 354 Review Questions 355 Programming Exercises Character Strings and String Functions 359 Defining Strings Within a Program 361 Character String Constants 361 Character String Arrays and Initialization 362 Array Versus Pointer 363 Specifying Storage Explicitly 365 Arrays of Character Strings 366 Pointers and Strings 367 String Input 368 Creating Space 369 The gets() Function 369 The scanfo Function 371 String Output 373 The puts() Function 373 The printfo Function 374 The Do-It-Yourself Option 375 String Functions 377 The strlen() Function 377 The strcato Function 378 The strcmpo Function 379 The strcpyo Function 383 The sprintfi) Function 386

9 The Waite Group's New Primer Plus Other String Functions 387 A String Example: Sorting Strings 388 Sorting 390 The ctype.h Character Functions 390 Command-Line Arguments 393 Command-Line Arguments in Integrated Environments 395 Command-Line Arguments with Think С 395 String to Number Conversions 396 Chapter Summary 397 Review Questions 398 Programming Exercises File Input/Output 403 Communicating with Files 404 What Is a File? 404 Levels of I/O 405 Standard Files 406 Standard I/O 406 Checking for Command-Line Arguments 407 The fopen() Function 408 The getc() and putc() Functions 409 The fclose() Function 410 Standard Files 410 A Simple-Minded File-Condensing Program 410 File I/O: Jprintfl), fscanfo, fgets(), m&fyuts() 412 The fprintfo and fscanfi') Functions 412 The fgets() and jputs() Functions 414 Adventures in Random Access: fseek() and ftell() 416 UowfieekO and fiell() Work 417 Binary Versus Text Mode 418 Portability 418 Using Random-Access in a Text Mode 419 Portability 421 Behind the Scenes with Standard I/O 422 Other Standard I/O Functions 422 int ungetc(int c, FILE *fp) 423 intfflush(file*fi>) 423 int setvbuf(file *fp, char *buf, int mode, size_t size) 423 Binary I/O: fread() and fwrite() 424 size_t fwrite(void *ptr, size_t size, size_t nmemb, FILE *fp) 426 size-tfread(void *ptr, size_t size, size_t nmemb, FILE *Jp) 426 intfeofifile *jp) and intferror(file *fi>) 427 An Example 427 xiv

10 Chapter Summary 430 Review Questions 430 Programming Exercises Storage Classes and Program Development 433 Storage Classes and Scope 434 Scope, Linkage, and Storage Duration 436 Automatic Variables 437 External Variables 438 Definitions and Declarations 441 Static Variables 442 External Static Variables 443 Multiple Files 444 Scope and Functions 444 Register Variables 444 Which Storage Class? 445 A Random Number Function 446 Roll'Em 450 Sorting Numbers 452 Global Decisions 453 Reading Numeric Data 454 The getarrayo Function 456 Sorting the Data 458 Printing the Data 460 Results 461 Comments 462 ANSI С Type Qualifiers 462 The consttype Qualifier 462 The volatiletypc Qualifier 463 Chapter Summary 464 Review Questions 465 Programming Exercises Structures and Other Data Forms 469 Example Problem: Creating an Inventory of Books 470 Setting Up the Structure Template 471 Defining a Structure Variable 472 Initializing a Structure 473 Gaining Access to Structure Members 474 Arrays of Structures 475 Declaring an Array of Structures 477 Identifying Members of an Array of Structures 477 Program Details 479

11 The Waite Group's New Primer Plus Nested Structures 479 Pointers to Structures 481 Declaring and Initializing a Structure Pointer 482 Member Access by Pointer 483 Telling Functions About Structures 483 Passing Structure Members 484 Using the Structure Address 485 Passing a Structure as an Argument 486 More on the New, Improved Structure Status 487 Structures or Pointer to Structures? 490 Functions Using an Array of Structures 491 Saving the Structure Contents in a File 493 Program Points 496 Structures: What Next? 497 Unions A Quick Look 498 typedef- A Quick Look 501 Fancy Declarations 504 Functions and Pointers 505 Chapter Summary 507 Review Questions 508 Programming Exercises Bit Fiddling 513 Binary Numbers, Bits, and Bytes 514 Binary Integers 514 Signed Integers 515 Binary Floating Point 516 Other Bases 516 Octal 516 Hexadecimal 517 C's Bitwise Operators 518 Bitwise Logical Operators 518 Usage: Masks 520 Usage: Turning Bits On 521 Usage: Turning Bits Off 522 Usage: Toggling Bits 522 Usage: Checking the Value of a Bit 522 Bitwise Shift Operators 523 Programming Example 524 Another Example 525 Bit Fields 527 Bit-Field Example 528 Chapter Summary 532 Review Questions 533 Programming Exercises 534

12 16 The С Preprocessor and the С Library 535 Manifest Constants: #define 536 Tokens 540 Redefining Constants 540 Using Arguments with #define 541 Including the Macro Argument in a String 543 Macro or Function? 544 File Inclusion: Mnclude 545 Header Files: An Example 546 Uses for Header Files 547 Other Directives 548 The #undef Directive 548 Conditional Compilation 549 Enumerated Types 552 enum Constants 553 Default Values 553 Assigned Values 553 Usage 554 The С Library 555 Gaining Access to the С Library 555 Using the Library Descriptions 556 The Math Library 557 The General Utilities Library 559 The exit() and atexit() Functions 560 Memory Allocation: malloc() andfieef) 562 The calloc() Function 565 Storage Classes and Dynamic Memory Allocation 566 Chapter Summary 567 Review Questions 567 Programming Exercises Advanced Data Representation 571 Exploring Data Representation 573 Beyond the Array to the Linked List 575 Using a Linked List 580 Afterthoughts 583 Abstract Data Types (ADTs) 583 Getting Abstract 585 Building an Interface 586 Using the Interface 590 Implementing the Interface 591 Getting Queued with an ADT 598 Implementing the Interface Data Representation 599 Testing the Queue 608

13 The Waite Group's New Primer Plus Simulating with a Queue 610 The Linked List Versus the Array 616 Binary Search Trees 620 A Binary Tree ADT 621 The Binary Search Tree Interface 622 The Binary Tree Implementation 624 Trying the Tree 631 Tree Thoughts 635 Other Directions 637 Chapter Summary 637 Review Questions 638 Programming Exercises 638 A Additional Reading 641 С Language 641 Programming 642 Reference 643 В С Operators 645 Arithmetic Operators 646 Relational Operators 646 Relational Expressions 647 Assignment Operators 647 Example 647 Logical Operators 648 Logical Expressions 648 Order of Evaluation for Logical Expressions 648 Examples 648 The Conditional Operator 648 Examples 648 Pointer-Related Operators 648 Example 649 Sign Operators 649 Structure and Union Operators 649 The Membership Operator 649 Example 649 The Indirect Membership Operator 649 Example 650 Bitwise Operators 650 Examples 650 Miscellaneous Operators 651 Example 651 xviii

14 Contents I ^^^B С Basic Types and Storage Classes 653 Summary: The Basic Data Types 653 Keywords 653 Signed Integers 653 Unsigned Integers 654 Characters 654 Floating Point 654 Summary: How to Declare a Simple Variable 654 Summary: Qualifiers 656 Keywords 656 General Comments 656 Properties 656 D Expressions, Statements, and Program Flow 657 Summary: Expressions and Statements 657 Expressions 657 Statements 658 Summary: The while Statement 658 Keyword 658 General Comments 658 Form 658 Examples 658 Summary: The for Statement 659 Keyword 659 General Comments 659 Form 659 Example 659 Summary: The do while Statement 659 Keywords 659 General Comments 659 Form 660 Example 660 Summary: Using if Statements for Making Choices 660 Keywords 660 General Comments 660 Form Form Form Example 661 Summary: Multiple Choice with switch 661 Keyword 661 General Comments 661 Form 661 xix

15 The Waite Group's New Primer Plus Examples 662 Summary: Program Jumps 662 Keywords 662 General Comments 662 The break Command 662 The continue Command 663 The goto Command 663 E ASCII Table 665 F Standard I/O Functions (ANSI C) 671 G Answers to the Review Questions 675 Chapter Chapter Chapter Chapter Chapter Chapter Chapter Chapter Chapter Chapter Chapter Chapter Chapter Chapter Chapter Chapter Chapter Index 699 XX

Primer Plus. Fourth Edition. Stephen Prata. 800 East 96th St., Indianapolis, Indiana, USA

Primer Plus. Fourth Edition. Stephen Prata. 800 East 96th St., Indianapolis, Indiana, USA C Primer Plus Fourth Edition Stephen Prata 800 East 96th St., Indianapolis, Indiana, 46240 USA C Primer Plus, Fourth Edition Copyright 2002 by Sams Publishing All rights reserved. No part of this book

More information

Writing 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 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 information

C-LANGUAGE CURRICULAM

C-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 information

C Programming. Course Outline. C Programming. Code: MBD101. Duration: 10 Hours. Prerequisites:

C 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 information

C Programming SYLLABUS COVERAGE SYLLABUS IN DETAILS

C 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 information

CSCI 171 Chapter Outlines

CSCI 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 information

Contents. Preface. Introduction. Introduction to C Programming

Contents. 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 information

About 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 information

Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS

Preface... (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 information

Review of the C Programming Language for Principles of Operating Systems

Review 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 information

Practical C++ Programming

Practical 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 information

Practical C Programming. Steve Oualline

Practical 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 information

DETAILED SYLLABUS INTRODUCTION TO C LANGUAGE

DETAILED 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 information

Review of the C Programming Language

Review of the C Programming Language Review of the C Programming Language Prof. James L. Frankel Harvard University Version of 11:55 AM 22-Apr-2018 Copyright 2018, 2016, 2015 James L. Frankel. All rights reserved. Reference Manual for the

More information

Model Viva Questions for Programming in C lab

Model 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 information

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

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 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 information

B.V. Patel Institute of Business Management, Computer & Information Technology, Uka Tarsadia University

B.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 information

SOME ASSEMBLY REQUIRED

SOME ASSEMBLY REQUIRED SOME ASSEMBLY REQUIRED Assembly Language Programming with the AVR Microcontroller TIMOTHY S. MARGUSH CRC Press Taylor & Francis Group CRC Press is an imprint of the Taylor & Francis Croup an Informa business

More information

UNIT I : OVERVIEW OF COMPUTERS AND C-PROGRAMMING

UNIT 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 information

KLiC C Programming. (KLiC Certificate in C Programming)

KLiC 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 information

Aryan College. Fundamental of C Programming. Unit I: Q1. What will be the value of the following expression? (2017) A + 9

Aryan 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 information

Course Title: C Programming Full Marks: Course no: CSC110 Pass Marks: Nature of course: Theory + Lab Credit hours: 3

Course 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 information

UNIT- 3 Introduction to C++

UNIT- 3 Introduction to C++ UNIT- 3 Introduction to C++ C++ Character Sets: Letters A-Z, a-z Digits 0-9 Special Symbols Space + - * / ^ \ ( ) [ ] =!= . $, ; : %! &? _ # = @ White Spaces Blank spaces, horizontal tab, carriage

More information

LESSON 1. A C program is constructed as a sequence of characters. Among the characters that can be used in a program are:

LESSON 1. A C program is constructed as a sequence of characters. Among the characters that can be used in a program are: LESSON 1 FUNDAMENTALS OF C The purpose of this lesson is to explain the fundamental elements of the C programming language. C like other languages has all alphabet and rules for putting together words

More information

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING UNIT-1

DEPARTMENT 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 information

CHAPTER 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 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 information

PERIYAR CENTENARY POLYTECHNIC COLLEGE Periyar Nagar- Vallam Thanjavur

PERIYAR 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 information

CS 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 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 information

Problem Solving with C++

Problem Solving with C++ GLOBAL EDITION Problem Solving with C++ NINTH EDITION Walter Savitch Kendrick Mock Ninth Edition PROBLEM SOLVING with C++ Problem Solving with C++, Global Edition Cover Title Copyright Contents Chapter

More information

MPATE-GE 2618: C Programming for Music Technology. Syllabus

MPATE-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 information

Absolute C++ Walter Savitch

Absolute 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 information

Features of C. Portable Procedural / Modular Structured Language Statically typed Middle level language

Features of C. Portable Procedural / Modular Structured Language Statically typed Middle level language 1 History C is a general-purpose, high-level language that was originally developed by Dennis M. Ritchie to develop the UNIX operating system at Bell Labs. C was originally first implemented on the DEC

More information

Advanced C Programming Topics

Advanced C Programming Topics Introductory Medical Device Prototyping Advanced C Programming Topics, http://saliterman.umn.edu/ Department of Biomedical Engineering, University of Minnesota Operations on Bits 1. Recall there are 8

More information

Goals of C "" The Goals of C (cont.) "" Goals of this Lecture"" The Design of C: A Rational Reconstruction"

Goals of C  The Goals of C (cont.)  Goals of this Lecture The Design of C: A Rational Reconstruction Goals of this Lecture The Design of C: A Rational Reconstruction Help you learn about: The decisions that were available to the designers of C The decisions that were made by the designers of C Why? Learning

More information

C Programming for Electronic Engineers

C Programming for Electronic Engineers C Programming for Electronic Engineers Keith Jackson BSc CEng MIEE with acknowledgement to Gavin Eamshaw MEng School of Electronic, Communication and Electrical Engineering University of Plymouth MACMILLAN

More information

EECS2031. Modifiers. Data Types. Lecture 2 Data types. signed (unsigned) int long int long long int int may be omitted sizeof()

EECS2031. Modifiers. Data Types. Lecture 2 Data types. signed (unsigned) int long int long long int int may be omitted sizeof() Warning: These notes are not complete, it is a Skelton that will be modified/add-to in the class. If you want to us them for studying, either attend the class or get the completed notes from someone who

More information

Model Viva Questions for Programming in C lab

Model 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 information

CprE 288 Introduction to Embedded Systems Exam 1 Review. 1

CprE 288 Introduction to Embedded Systems Exam 1 Review.  1 CprE 288 Introduction to Embedded Systems Exam 1 Review http://class.ece.iastate.edu/cpre288 1 Overview of Today s Lecture Announcements Exam 1 Review http://class.ece.iastate.edu/cpre288 2 Announcements

More information

VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANGULATHUR

VALLIAMMAI 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 information

I BCA[ ] SEMESTER I CORE: C PROGRAMMING - 106A Multiple Choice Questions.

I BCA[ ] SEMESTER I CORE: C PROGRAMMING - 106A Multiple Choice Questions. 1 of 22 8/4/2018, 4:03 PM Dr.G.R.Damodaran College of Science (Autonomous, affiliated to the Bharathiar University, recognized by the UGC)Reaccredited at the 'A' Grade Level by the NAAC and ISO 9001:2008

More information

Structure of this course. C and C++ Past Exam Questions. Text books

Structure of this course. C and C++ Past Exam Questions. Text books Structure of this course C and C++ 1. Types Variables Expressions & Statements Alastair R. Beresford University of Cambridge Lent Term 2008 Programming in C: types, variables, expressions & statements

More information

Fundamental 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 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 information

C & Data Structures syllabus

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 information

Tokens, Expressions and Control Structures

Tokens, Expressions and Control Structures 3 Tokens, Expressions and Control Structures Tokens Keywords Identifiers Data types User-defined types Derived types Symbolic constants Declaration of variables Initialization Reference variables Type

More information

Systems Programming. 08. Standard I/O Library. Alexander Holupirek

Systems Programming. 08. Standard I/O Library. Alexander Holupirek Systems Programming 08. Standard I/O Library Alexander Holupirek Database and Information Systems Group Department of Computer & Information Science University of Konstanz Summer Term 2008 Last lecture:

More information

(heavily based on last year s notes (Andrew Moore) with thanks to Alastair R. Beresford. 1. Types Variables Expressions & Statements 2/23

(heavily based on last year s notes (Andrew Moore) with thanks to Alastair R. Beresford. 1. Types Variables Expressions & Statements 2/23 Structure of this course Programming in C: types, variables, expressions & statements functions, compilation, pre-processor pointers, structures extended examples, tick hints n tips Programming in C++:

More information

edunepal_info

edunepal_info facebook.com/edunepal.info @ edunepal_info C interview questions (1 125) C interview questions are given with the answers in this website. We have given C interview questions faced by freshers and experienced

More information

The Design of C: A Rational Reconstruction (cont.)

The Design of C: A Rational Reconstruction (cont.) The Design of C: A Rational Reconstruction (cont.) 1 Goals of this Lecture Recall from last lecture Help you learn about: The decisions that were available to the designers of C The decisions that were

More information

Programming Fundamentals - A Modular Structured Approach using C++ By: Kenneth Leroy Busbee

Programming 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 information

DEPARTMENT 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 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

Introduction to Computers and C++ Programming p. 1 Computer Systems p. 2 Hardware p. 2 Software p. 7 High-Level Languages p. 8 Compilers p.

Introduction to Computers and C++ Programming p. 1 Computer Systems p. 2 Hardware p. 2 Software p. 7 High-Level Languages p. 8 Compilers p. Introduction to Computers and C++ Programming p. 1 Computer Systems p. 2 Hardware p. 2 Software p. 7 High-Level Languages p. 8 Compilers p. 9 Self-Test Exercises p. 11 History Note p. 12 Programming and

More information

M4.1-R3: PROGRAMMING AND PROBLEM SOLVING THROUGH C LANGUAGE

M4.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 information

C Programming Multiple. Choice

C Programming Multiple. Choice C Programming Multiple Choice Questions 1.) Developer of C language is. a.) Dennis Richie c.) Bill Gates b.) Ken Thompson d.) Peter Norton 2.) C language developed in. a.) 1970 c.) 1976 b.) 1972 d.) 1980

More information

P.G.TRB - COMPUTER SCIENCE. c) data processing language d) none of the above

P.G.TRB - COMPUTER SCIENCE. c) data processing language d) none of the above P.G.TRB - COMPUTER SCIENCE Total Marks : 50 Time : 30 Minutes 1. C was primarily developed as a a)systems programming language b) general purpose language c) data processing language d) none of the above

More information

SAURASHTRA UNIVERSITY

SAURASHTRA 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 information

Appendix. Grammar. A.1 Introduction. A.2 Keywords. There is no worse danger for a teacher than to teach words instead of things.

Appendix. Grammar. A.1 Introduction. A.2 Keywords. There is no worse danger for a teacher than to teach words instead of things. A Appendix Grammar There is no worse danger for a teacher than to teach words instead of things. Marc Block Introduction keywords lexical conventions programs expressions statements declarations declarators

More information

Programming in C and C++

Programming in C and C++ Programming in C and C++ 1. Types Variables Expressions & Statements Dr. Anil Madhavapeddy University of Cambridge (based on previous years thanks to Alan Mycroft, Alastair Beresford and Andrew Moore)

More information

A S H O R T I S H O V E R V I E W O F T H E A N S I C P R O G R A M M I N G L A N G U A G E

A S H O R T I S H O V E R V I E W O F T H E A N S I C P R O G R A M M I N G L A N G U A G E A S H O R T I S H O V E R V I E W O F T H E A N S I C P R O G R A M M I N G L A N G U A G E IDENTIFIERS Identifiers are names of variables, functions, defined types, structures and unions, enumeration

More information

V.S.B ENGINEERING COLLEGE DEPARTMENT OF INFORMATION TECHNOLOGY I IT-II Semester. Sl.No Subject Name Page No. 1 Programming & Data Structures-I 2

V.S.B ENGINEERING COLLEGE DEPARTMENT OF INFORMATION TECHNOLOGY I IT-II Semester. Sl.No Subject Name Page No. 1 Programming & Data Structures-I 2 V.S.B ENGINEERING COLLEGE DEPARTMENT OF INFORMATION TECHNOLOGY I IT-II Semester Sl.No Subject Name Page No. 1 Programming & Data Structures-I 2 CS6202 - PROGRAMMING & DATA STRUCTURES UNIT I Part - A 1.

More information

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.

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. 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 information

File (1A) Young Won Lim 11/25/16

File (1A) Young Won Lim 11/25/16 File (1A) Copyright (c) 2010-2016 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version

More information

CS PROGRAMMING & ATA STRUCTURES I. UNIT I Part - A

CS PROGRAMMING & ATA STRUCTURES I. UNIT I Part - A CS6202 - PROGRAMMING & ATA STRUCTURES I Question Bank UNIT I Part - A 1. What are Keywords? 2. What is the difference between if and while statement? 3. What is the difference between while loop and do

More information

IECD Institute for Entrepreneurship and Career Development Bharathidasan University, Tiruchirappalli 23.

IECD Institute for Entrepreneurship and Career Development Bharathidasan University, Tiruchirappalli 23. Subject code - CCP01 Chapt Chapter 1 INTRODUCTION TO C 1. A group of software developed for certain purpose are referred as ---- a. Program b. Variable c. Software d. Data 2. Software is classified into

More information

CERTIFICATE IN WEB PROGRAMMING

CERTIFICATE 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 information

Fundamentals of Programming

Fundamentals of Programming Fundamentals of Programming Lecture 3 - Constants, Variables, Data Types, And Operations Lecturer : Ebrahim Jahandar Borrowed from lecturer notes by Omid Jafarinezhad Outline C Program Data types Variables

More information

CS6202 - PROGRAMMING & DATA STRUCTURES UNIT I Part - A 1. W hat are Keywords? Keywords are certain reserved words that have standard and pre-defined meaning in C. These keywords can be used only for their

More information

Welcome 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 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 information

Advanced C Programming and Introduction to Data Structures

Advanced C Programming and Introduction to Data Structures FYBCA Semester II (Advanced C Programming and Introduction to Data Structures) Question Bank Multiple Choice Questions Unit-1 1. Which operator is used with a pointer to access the value of the variable

More information

The Design of C: A Rational Reconstruction (cont.)" Jennifer Rexford!

The Design of C: A Rational Reconstruction (cont.) Jennifer Rexford! The Design of C: A Rational Reconstruction (cont.)" Jennifer Rexford! 1 Goals of this Lecture"" Help you learn about:! The decisions that were available to the designers of C! The decisions that were made

More information

C Programming Language (Chapter 2 of K&R) Variables and Constants

C Programming Language (Chapter 2 of K&R) Variables and Constants C Programming Language (Chapter 2 of K&R) Types, Operators and Expressions Variables and Constants Basic objects manipulated by programs Declare before use: type var1, var2, int x, y, _X, x11, buffer;

More information

C OVERVIEW BASIC C PROGRAM STRUCTURE. C Overview. Basic C Program Structure

C OVERVIEW BASIC C PROGRAM STRUCTURE. C Overview. Basic C Program Structure C Overview Basic C Program Structure C OVERVIEW BASIC C PROGRAM STRUCTURE Goals The function main( )is found in every C program and is where every C program begins speed execution portability C uses braces

More information

Computers Programming Course 5. Iulian Năstac

Computers Programming Course 5. Iulian Năstac Computers Programming Course 5 Iulian Năstac Recap from previous course Classification of the programming languages High level (Ada, Pascal, Fortran, etc.) programming languages with strong abstraction

More information

Introduction to Programming Using Java (98-388)

Introduction 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 information

Writing Program in C Expressions and Control Structures (Selection Statements and Loops)

Writing Program in C Expressions and Control Structures (Selection Statements and Loops) Writing Program in C Expressions and Control Structures (Selection Statements and Loops) Jan Faigl Department of Computer Science Faculty of Electrical Engineering Czech Technical University in Prague

More information

CS113: Lecture 3. Topics: Variables. Data types. Arithmetic and Bitwise Operators. Order of Evaluation

CS113: Lecture 3. Topics: Variables. Data types. Arithmetic and Bitwise Operators. Order of Evaluation CS113: Lecture 3 Topics: Variables Data types Arithmetic and Bitwise Operators Order of Evaluation 1 Variables Names of variables: Composed of letters, digits, and the underscore ( ) character. (NO spaces;

More information

Part I Part 1 Expressions

Part I Part 1 Expressions Writing Program in C Expressions and Control Structures (Selection Statements and Loops) Jan Faigl Department of Computer Science Faculty of Electrical Engineering Czech Technical University in Prague

More information

CS201 Some Important Definitions

CS201 Some Important Definitions CS201 Some Important Definitions For Viva Preparation 1. What is a program? A program is a precise sequence of steps to solve a particular problem. 2. What is a class? We write a C++ program using data

More information

C OVERVIEW. C Overview. Goals speed portability allow access to features of the architecture speed

C OVERVIEW. C Overview. Goals speed portability allow access to features of the architecture speed C Overview C OVERVIEW Goals speed portability allow access to features of the architecture speed C fast executables allows high-level structure without losing access to machine features many popular languages

More information

Fundamental of Programming (C)

Fundamental of Programming (C) Borrowed from lecturer notes by Omid Jafarinezhad Fundamental of Programming (C) Lecturer: Vahid Khodabakhshi Lecture 3 Constants, Variables, Data Types, And Operations Department of Computer Engineering

More information

Appendix A Developing a C Program on the UNIX system

Appendix 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 information

Rule 1-3: Use white space to break a function into paragraphs. Rule 1-5: Avoid very long statements. Use multiple shorter statements instead.

Rule 1-3: Use white space to break a function into paragraphs. Rule 1-5: Avoid very long statements. Use multiple shorter statements instead. Chapter 9: Rules Chapter 1:Style and Program Organization Rule 1-1: Organize programs for readability, just as you would expect an author to organize a book. Rule 1-2: Divide each module up into a public

More information

Character Set. The character set of C represents alphabet, digit or any symbol used to represent information. Digits 0, 1, 2, 3, 9

Character Set. The character set of C represents alphabet, digit or any symbol used to represent information. Digits 0, 1, 2, 3, 9 Character Set The character set of C represents alphabet, digit or any symbol used to represent information. Types Uppercase Alphabets Lowercase Alphabets Character Set A, B, C, Y, Z a, b, c, y, z Digits

More information

UNIT - I. Introduction to C Programming. BY A. Vijay Bharath

UNIT - I. Introduction to C Programming. BY A. Vijay Bharath UNIT - I Introduction to C Programming Introduction to C C was originally developed in the year 1970s by Dennis Ritchie at Bell Laboratories, Inc. C is a general-purpose programming language. It has been

More information

C Language Part 1 Digital Computer Concept and Practice Copyright 2012 by Jaejin Lee

C Language Part 1 Digital Computer Concept and Practice Copyright 2012 by Jaejin Lee C Language Part 1 (Minor modifications by the instructor) References C for Python Programmers, by Carl Burch, 2011. http://www.toves.org/books/cpy/ The C Programming Language. 2nd ed., Kernighan, Brian,

More information

Computer Programming C++ (wg) CCOs

Computer 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 information

Main Program. C Programming Notes. #include <stdio.h> main() { printf( Hello ); } Comments: /* comment */ //comment. Dr. Karne Towson University

Main Program. C Programming Notes. #include <stdio.h> main() { printf( Hello ); } Comments: /* comment */ //comment. Dr. Karne Towson University C Programming Notes Dr. Karne Towson University Reference for C http://www.cplusplus.com/reference/ Main Program #include main() printf( Hello ); Comments: /* comment */ //comment 1 Data Types

More information

Computers Programming Course 6. Iulian Năstac

Computers Programming Course 6. Iulian Năstac Computers Programming Course 6 Iulian Năstac Recap from previous course Data types four basic arithmetic type specifiers: char int float double void optional specifiers: signed, unsigned short long 2 Recap

More information

Basic C Programming (2) Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island

Basic C Programming (2) Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island Basic C Programming (2) Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island Data Types Basic Types Enumerated types The type void Derived types

More information

Problem Solving and 'C' Programming

Problem Solving and 'C' Programming Problem Solving and 'C' Programming Targeted at: Entry Level Trainees Session 15: Files and Preprocessor Directives/Pointers 2007, Cognizant Technology Solutions. All Rights Reserved. The information contained

More information

FUNCTIONS POINTERS. Pointers. Functions

FUNCTIONS POINTERS. Pointers. Functions Functions Pointers FUNCTIONS C allows a block of code to be separated from the rest of the program and named. These blocks of code or modules are called functions. Functions can be passed information thru

More information

C for Electronic Engineering

C 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 information

MISRA-C:2012 Standards Model Summary for C / C++

MISRA-C:2012 Standards Model Summary for C / C++ Version 9.7.1 Copyright 2017 Ltd. MISRA-C:2012 s Model Summary for C / C++ The tool suite is developed and certified to BS EN ISO 9001:2000 and SGS-TÜV Saar. This information is applicable to version 9.7.1

More information

A Fast Review of C Essentials Part I

A 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 information

Borland 105, 278, 361, 1135 Bounded array Branch instruction 7 break statement 170 BTree 873 Building a project 117 Built in data types 126

Borland 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 information

Contents. 1 Introduction to Computers, the Internet and the World Wide Web 1. 2 Introduction to C Programming 26

Contents. 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 information

Short Notes of CS201

Short Notes of CS201 #includes: Short Notes of CS201 The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with < and > if the file is a system

More information

Pointers cause EVERYBODY problems at some time or another. char x[10] or char y[8][10] or char z[9][9][9] etc.

Pointers cause EVERYBODY problems at some time or another. char x[10] or char y[8][10] or char z[9][9][9] etc. Compound Statements So far, we ve mentioned statements or expressions, often we want to perform several in an selection or repetition. In those cases we group statements with braces: i.e. statement; statement;

More information

Chapter 14 - Advanced C Topics

Chapter 14 - Advanced C Topics Chapter 14 - Advanced C Topics Outline 14.1 Introduction 14.2 Redirecting Input/Output on UNIX and DOS Systems 14.3 Variable-Length Argument Lists 14.4 Using Command-Line Arguments 14.5 Notes on Compiling

More information

Engineering Computing I

Engineering Computing I Engineering Computing I Types, Operators, and Expressions Types Operators Expressions 2 1 2.1 Variable Names Names are made up of letters and digits The first character must be a letter The underscore

More information

KLiC C. About. Tools: Turbo C++ Syllabus:

KLiC 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 information