Basic Programming Skills/ Foundations of Computer Programming DCAP102/DCAP401 Editor Dr

Total Page:16

File Type:pdf, Size:1020Kb

Basic Programming Skills/ Foundations of Computer Programming DCAP102/DCAP401 Editor Dr Basic Programming Skills/ Foundations of Computer Programming DCAP102/DCAP401 Editor Dr. Anil Sharma www.lpude.in DIRECTORATE OF DISTANCE EDUCATION BASIC PROGRAMMING SKILLS/ FOUNDATIONS OF COMPUTER PROGRAMMING Edited By Dr. Anil Sharma ISBN: 978-93-87034-75-4 Printed by EXCEL BOOKS PRIVATE LIMITED Regd. Office: E-77, South Ext. Part-I, Delhi-110049 Corporate Office: 1E/14, Jhandewalan Extension, New Delhi-110055 +91-8800697053, +91-011-47520129 [email protected]/[email protected] [email protected] www.excelbooks.com for Lovely Professional University Phagwara CONTENTS Unit 1: Foundation of Programming Languages 1 Manmohan Sharma, Lovely Professional University Unit 2: Introduction to C Language 19 Kumar Vishal, Lovely Professional University Unit 3: Basics - The C Declaration 36 Anil Sharma, Lovely Professional University Unit 4: Operators 48 Yadwinder Singh, Lovely Professional University Unit 5: Managing Input and Output in C 61 Anuj Sharma, Lovely Professional University Unit 6: Decision-making and Branching 91 Balraj Kumar, Lovely Professional University Unit 7: Decision-making and Looping 126 Mandeep Kaur, Lovely Professional University Unit 8: Arrays 155 Kanika Sharma, Lovely Professional University Unit 9: Strings 168 Sarabjit Kumar, Lovely Professional University Unit 10: Pointers 187 Anil Sharma, Lovely Professional University Unit 11: Functions 209 Anil Sharma, Lovely Professional University Unit 12: Union and Structure 237 Sarabjit Kumar, Lovely Professional University Unit 13: File Handling in C 266 Anil Sharma, Lovely Professional University Unit 14: Additional in C 282 Avinash Bhagat, Lovely Professional University SYLLABUS Basic Programming Skills/Foundations of Computer Programming Objectives: It imparts programming skills to students. Students will be able to: Understand the structure of a C/C++ language program including the use of variable definitions, data types, functions, scope and operators. Be able to develop, code, and test well structured programs using: if-then logic, while, do, and for loops, functions, arrays, strings and string functions Sr. No. Description 1. Introduction: ANSI C standard, Overview of Compiler and Interpreters, Structure of C Program, Programming rules, Execution 2. Basics – The C Declarations: C Character Set, keywords, : Identifiers, data types, operators, constants and variables Operators & Expressions 3. Input/ Output in C: Formatting input & output functions. 4. Decision-making Statements: if, else if Control Statements: For, do while, while. Control transfer statements - break, continue. 5. Arrays and Strings: Defining arrays; I/O of arrays, I/O of string data; built-in library functions to manipulate strings, array of strings 6. Pointer: Introductions, Features, Declaration, Pointers and Arrays, pointers to pointers ,Pointers and strings, Void Pointers 7. Functions: Defining and accessing a functions, passing arguments – call by value, function prototypes, recursive functions Storage Classes: Storage classes and their usage 8. Structures & Unions: Defining and processing structures, array of structures, nested structures, Unions & difference from Structures 9. Files: Opening, reading, writing & Closing file 10. Additional in C: Dynamic memory allocation, Memory models, Linked List Manmohan Sharma, Lovely Professional University Unit 1: Foundation of Programming Languages Unit 1: Foundation of Programming Languages Notes CONTENTS Objectives Introduction 1.1 Programming Language 1.2 Assembly Language 1.3 Assembly Program Execution 1.4 Assembler 1.5 Assembly Program and its Components 1.6 Machine Level Language 1.7 Higher Level Languages 1.8 Compiling High Level Language 1.9 Some High Level Languages 1.10 Summary 1.11 Keywords 1.12 Self Assessment 1.13 Review Questions 1.14 Further Readings Objectives After studying this unit, you will be able to: Explain programming language Describe assembly language Describe how to execute assemble program Explain higher level language Describe some high level language Introduction Computer is an electronic device which works on the instructions provided by the user. As the computer does not understand natural language, it is required to provide the instructions in some computer understandable language. Such a computer understandable language is known as Programming language. A computer programming language consists of a set of symbols and characters, words, and grammar rules that permit people to construct instructions in the format that can be interpreted by the computer system. LOVELY PROFESSIONAL UNIVERSITY 1 Basic Programming Skills/Foundations of Computer Programming Notes Computer Programming is the art of making a computer do what you want it to do. Computer programming is a fi eld that has to do with the analytical creation of source code that can be used to confi gure computer systems. Computer programmers may choose to function in a broad range of programming functions, or specialize in some aspect of development, support, or maintenance of computers for the home or workplace. Programmers provide the basis for the creation and ongoing function of the systems that many people rely upon for all sorts of information exchange, both business related and for entertainment purposes. 1.1 Programming Language Different programming languages support different styles of programming. The choice of language used is subject to many considerations, such as company policy, suitability to task, availability of third-party packages, or individual preference. Ideally, the programming language best suited for the task at hand will be selected. Trade-offs from this ideal involve fi nding enough programmers who know the language to build a team, the availability of compilers for that language, and the effi ciency with which programs written in a given language execute. The basic instructions of programming language are: 1. Input: Get data from the keyboard, a fi le, or some other device. 2. Output: Display data on the screen or send data to a fi le or other device. 3. Math: Perform basic mathematical operations like addition and multiplication. 4. Conditional execution: Check for certain conditions and execute the appropriate sequence of statements. 5. Repetition: Perform some action repeatedly, usually with some variation. 1.2 Assembly Language Assembly languages are also known as second generation languages. These languages substitute alphabetic symbols for the binary codes of machine language. In assembly language, symbols are used in place of absolute addresses to represent memory locations. Mnemonics are used for operation code, i.e., single letters or short abbreviations that help the programmers to understand what the code represents. e.g.: MOV AX, DX. Here mnemonic MOV represents ‘transfer’ operation and AX, DX are used to represent the registers. One of the fi rst steps in improving the program preparation process was to substitute letter symbols mnemonics for the numeric operation codes of machine language. A mnemonic is any kind of mental trick we use to help us remember. Mnemonics come in various shapes and sizes, all of them useful in their own way. Example: A computer may be designed to interpret the machine code of 1111 (binary) or 15 (decimal) as the operation ‘subtract’, but it is easier for human being to remember is as SUB. 2 LOVELY PROFESSIONAL UNIVERSITY Unit 1: Foundation of Programming Languages Use of Symbols Instead of Numeric of OpCodes Notes All computers have the power of handling letters as well as numbers. Hence, a computer can be taught to recognize certain combination of letter or numbers. It can be taught to substitute the number 14 every time it sees the symbol ADD, substitute the number 15 every time it sees the symbol SUB, and so forth. In this way, the computer can be trained to translate a program written with symbols instead of numbers into the computer’s own machine language. Then we can write program for the computer using symbols instead of numbers, and have the computer do its own translating. This makes it easier for the programmer, because he can use letters, symbols, and mnemonics instead of numbers for writing his programs. Example: The preceding program that was written in machine language for adding two numbers and printing out the result could be written in the following way: CLA A ADD B STA C TYP C HLT Which would mean “take A, add B, store the result in C, type C, and halt.” The computer by means of a translating program, would translate each line of this program into the corresponding machine language program. Advantages of Assembly Language The main advantages of assembly language are: 1. Assembly language is easier to use than machine language. 2. An assembler is useful for detecting programming errors. 3. Programmers do not have to know the absolute addresses of data items. 4. Assembly languages encourage modular programming. Disadvantages of Assembly Language The main disadvantages of assembly language are: 1. Assembly language programs are not directly executable. 2. Assembly languages are machine dependent and, therefore, not portable from one machine to another. 3. Programming in assembly language requires a higher level of programming skill. 1.3 Assembly Program Execution An assembly program is written according to a strict set of rules. An editor or word processor is used for keying an assembly program into the computer as a fi le, and then the assembler is used to translate the program into machine code. LOVELY PROFESSIONAL UNIVERSITY 3 Basic Programming
Recommended publications
  • While Statement in C
    While Statement In C EnricoIs Reg alwaysdisheartening deplete or his novel aspects when chagrined luminesced disputatiously, some crayfishes he orbits clump so temporizingly? grindingly. Solid Ring-necked and comose Bennet Brendan tarnishes never tensehalf-and-half his Stuttgart! while Thank you use a counter is a while loop obscures the condition which is evaluated to embed videos in while c program C while loops statement allows to repeatedly run at same recipient of code until a wrap is met while loop is empty most basic loop in C programming while loop. We then hand this variable c in the statement block and represent your value for each. While adultery in C Set of instructions given coil the compiler to night set of statements until condition becomes false is called loops. If it is negative number added to the condition in c language including but in looping structures, but is executed infinite loop! While Loop Definition Example & Results Video & Lesson. While talking in C Know Program. What is the while eternal in C? A while loop around loop continuously and infinitely until the policy inside the parenthesis becomes false money must guard the. C while and dowhile Loop Programiz. Programming While Loop. The widow while redeem in the C language is basically a post tested loop upon the execution of several parts of the statements can be repeated by reckless use children do-while. 43 Loops Applications in C for Engineering Technology. Do it Loop in C Programming with Examples Phptpoint. Statements and display control C Tutorials Cpluspluscom. Do while just in c example program.
    [Show full text]
  • Detecting and Escaping Infinite Loops Using Bolt
    Detecting and Escaping Infinite Loops Using Bolt by Michael Kling Submitted to the Department of Electrical Engineering and Computer Science in partial fulfillment of the requirements for the degree of Masters of Engineering in Electical Engineering and Computer Science at the MASSACHUSETTS INSTITUTE OF TECHNOLOGY February 2012 c Massachusetts Institute of Technology 2012. All rights reserved. Author.............................................................. Department of Electrical Engineering and Computer Science February 1, 2012 Certified by. Martin Rinard Professor Thesis Supervisor Accepted by . Prof. Dennis M. Freeman Chairman, Masters of Engineering Thesis Committee 2 Detecting and Escaping Infinite Loops Using Bolt by Michael Kling Submitted to the Department of Electrical Engineering and Computer Science on February 1, 2012, in partial fulfillment of the requirements for the degree of Masters of Engineering in Electical Engineering and Computer Science Abstract In this thesis we present Bolt, a novel system for escaping infinite loops. If a user suspects that an executing program is stuck in an infinite loop, the user can use the Bolt user interface, which attaches to the running process and determines if the program is executing in an infinite loop. If that is the case, the user can direct the interface to automatically explore multiple strategies to escape the infinite loop, restore the responsiveness of the program, and recover useful output. Bolt operates on stripped x86 and x64 binaries, analyzes both single-thread and multi-threaded programs, dynamically attaches to the program as-needed, dynami- cally detects the loops in a program and creates program state checkpoints to enable exploration of different escape strategies. This makes it possible for Bolt to detect and escape infinite loops in off-the-shelf software, without available source code, or overhead in standard production use.
    [Show full text]
  • CS 161, Lecture 8: Error Handling and Functions – 29 January 2018 Revisit Error Handling
    CS 161, Lecture 8: Error Handling and Functions – 29 January 2018 Revisit Error Handling • Prevent our program from crashing • Reasons programs will crash or have issues: • Syntax Error – prevents compilation, the programmer caused this by mistyping or breaking language rules • Logic Errors – the code does not perform as expected because the underlying logic is incorrect such as off by one, iterating in the wrong direction, having conditions which will never end or be met, etc. • Runtime Errors – program stops running due to segmentation fault or infinite loop potentially caused by trying to access memory that is not allocated, bad user input that was not handled, etc. check_length • The end of a string is determined by the invisible null character ‘\0’ • while the character in the string is not null, keep counting Assignment 3 Notes • Allowed functions: • From <string>: .length(), getline(), [], += • From <cmath>: pow() • Typecasting allowed only if the character being converted fits the stated criterion (i.e. character was confirmed as an int, letter, etc.) • ASCII Chart should be used heavily http://www.asciitable.com/ Debugging Side Bar • Read compiler messages when you have a syntax error • If you suspect a logic error -> print everything! • Allows you to track the values stored in your variables, especially in loops and changing scopes • Gives you a sense of what is executing when in your program Decomposition • Divide problem into subtasks • Procedural Decomposition: get ready in the morning, cooking, etc. • Incremental Programming:
    [Show full text]
  • Automatic Repair of Infinite Loops
    Automatic Repair of Infinite Loops Sebastian R. Lamelas Marcote Martin Monperrus University of Buenos Aires University of Lille & INRIA Argentina France Abstract Research on automatic software repair is concerned with the develop- ment of systems that automatically detect and repair bugs. One well-known class of bugs is the infinite loop. Every computer programmer or user has, at least once, experienced this type of bug. We state the problem of repairing infinite loops in the context of test-suite based software repair: given a test suite with at least one failing test, generate a patch that makes all test cases pass. Consequently, repairing infinites loop means having at least one test case that hangs by triggering the infinite loop. Our system to automatically repair infinite loops is called Infinitel. We develop a technique to manip- ulate loops so that one can dynamically analyze the number of iterations of loops; decide to interrupt the loop execution; and dynamically examine the state of the loop on a per-iteration basis. Then, in order to synthesize a new loop condition, we encode this set of program states as a code synthesis problem using a technique based on Satisfiability Modulo Theory (SMT). We evaluate our technique on seven seeded-bugs and on seven real-bugs. Infinitel is able to repair all of them, within seconds up to one hour on a standard laptop configuration. 1 Introduction Research on automatic software repair is concerned with the development of sys- tems that automatically detect and repair bugs. We consider as bug a behavior arXiv:1504.05078v1 [cs.SE] 20 Apr 2015 observed during program execution that does not correspond to the expected one.
    [Show full text]
  • Chapter 6 Flow of Control
    Chapter 6 Flow of Control 6.1 INTRODUCTION “Don't you hate code that's In Figure 6.1, we see a bus carrying the children to not properly indented? school. There is only one way to reach the school. The Making it [indenting] part of driver has no choice, but to follow the road one milestone the syntax guarantees that all after another to reach the school. We learnt in Chapter code is properly indented.” 5 that this is the concept of sequence, where Python executes one statement after another from beginning to – G. van Rossum the end of the program. These are the kind of programs we have been writing till now. In this chapter Figure 6.1: Bus carrying students to school » Introduction to Flow of Control Let us consider a program 6-1 that executes in » Selection sequence, that is, statements are executed in an order in which they are written. » Indentation The order of execution of the statements in a program » Repetition is known as flow of control. The flow of control can be » Break and Continue implemented using control structures. Python supports Statements two types of control structures—selection and repetition. » Nested Loops 2021-22 Ch 6.indd 121 08-Apr-19 12:37:51 PM 122 COMPUTER SCIENCE – CLASS XI Program 6-1 Program to print the difference of two numbers. #Program 6-1 #Program to print the difference of two input numbers num1 = int(input("Enter first number: ")) num2 = int(input("Enter second number: ")) diff = num1 - num2 print("The difference of",num1,"and",num2,"is",diff) Output: Enter first number 5 Enter second number 7 The difference of 5 and 7 is -2 6.2 SELECTION Now suppose we have `10 to buy a pen.
    [Show full text]
  • Autocoding Methods for Networked Embedded Systems
    University of Warwick institutional repository: http://go.warwick.ac.uk/wrap A Thesis Submitted for the Degree of PhD at the University of Warwick http://go.warwick.ac.uk/wrap/36892 This thesis is made available online and is protected by original copyright. Please scroll down to view the document itself. Please refer to the repository record for this item for information to help you to cite it. Our policy information is available from the repository home page. Innovation Report AUTOCODING METHODS FOR NETWORKED EMBEDDED SYSTEMS Submitted in partial fulfilment of the Engineering Doctorate By James Finney, 0117868 November 2009 Academic Supervisors: Dr. Peter Jones, Ross McMurran Industrial Supervisor: Dr. Paul Faithfull Declaration I have read and understood the rules on cheating, plagiarism and appropriate referencing as outlined in my handbook and I declare that the work contained in this submission is my own, unless otherwise acknowledged. Signed: …………………………………………………………………….James Finney ii Acknowledgements I would like to thank Rapicore Ltd and the EPSRC for funding this project. I would also like to offer special thanks to my supervisors: Dr. R.P. Jones, Dr. P. Faithfull, and R. McMurran, for their time, support, and guidance throughout this project. iii Table of Contents Declaration ....................................................................................................................... ii Acknowledgements ......................................................................................................... iii Figures
    [Show full text]
  • Infinite Loop Space Theory
    BULLETIN OF THE AMERICAN MATHEMATICAL SOCIETY Volume 83, Number 4, July 1977 INFINITE LOOP SPACE THEORY BY J. P. MAY1 Introduction. The notion of a generalized cohomology theory plays a central role in algebraic topology. Each such additive theory E* can be represented by a spectrum E. Here E consists of based spaces £, for / > 0 such that Ei is homeomorphic to the loop space tiEi+l of based maps l n S -» Ei+,, and representability means that E X = [X, En], the Abelian group of homotopy classes of based maps X -* En, for n > 0. The existence of the E{ for i > 0 implies the presence of considerable internal structure on E0, the least of which is a structure of homotopy commutative //-space. Infinite loop space theory is concerned with the study of such internal structure on spaces. This structure is of interest for several reasons. The homology of spaces so structured carries "homology operations" analogous to the Steenrod opera­ tions in the cohomology of general spaces. These operations are vital to the analysis of characteristic classes for spherical fibrations and for topological and PL bundles. More deeply, a space so structured determines a spectrum and thus a cohomology theory. In the applications, there is considerable interplay between descriptive analysis of the resulting new spectra and explicit calculations of homology groups. The discussion so far concerns spaces with one structure. In practice, many of the most interesting applications depend on analysis of the interrelation­ ship between two such structures on a space, one thought of as additive and the other as multiplicative.
    [Show full text]
  • Basically Speaking
    '' !{_ . - -,: s ' �"-� . ! ' , ) f MICRO VIDEQM P.O. (.t�Box 7357 204 E. Washington St. · Ann Arbor, MI 48107 BASICALLY SPEAKING A Guide to BASIC Progratntning for the INTERACT Cotnputer MICRO VIDEqM P.O. �Box � 7357 204 E. Washington St. Ann Arbor, Ml 48107 BASICALLY SPEAKING is a publication of Micro Video Corporation Copyright 1980 , Micro Video Corporation Copyright 1978 , Microsoft All Rights Reserved First Printing -- December 1980 Second Printing -- April 1981 (Revisions) \. BASICALLY SPEAKING A Guide to BASIC Programming for the Interact Computer Table of Contents Chapter 1 BASIC Basics......................................................... 1-1 The Three Interact BASIC Languages ................................ 1-11 BASIC Dialects .................................................... 1-12 Documentation Convent ions ......................................... 1-13 Chapter 2 HOW TO SPEAK BASIC................................................... 2-1 DIRECT MODE OPERATION. 2-2 Screen Control 2-4 .........................................•....... Screen Layout .................................................. 2-5 Graphics Commands . ............................................. 2-6 Sounds and Music............................................... 2-8 Funct ions ...................................................... 2-9 User-defined Functions ......................................... 2-12 INDIRECT MODE OPERATION . 2-13 Program Listings............................................... 2-14 Mu ltiple Statements on a Single Line ..........................
    [Show full text]
  • Control Flow Statements
    Control Flow Statements Christopher M. Harden Contents 1 Some more types 2 1.1 Undefined and null . .2 1.2 Booleans . .2 1.2.1 Creating boolean values . .3 1.2.2 Combining boolean values . .4 2 Conditional statements 5 2.1 if statement . .5 2.1.1 Using blocks . .5 2.2 else statement . .6 2.3 Tertiary operator . .7 2.4 switch statement . .8 3 Looping constructs 10 3.1 while loop . 10 3.2 do while loop . 11 3.3 for loop . 11 3.4 Further loop control . 12 4 Try it yourself 13 1 1 Some more types 1.1 Undefined and null The undefined type has only one value, undefined. Similarly, the null type has only one value, null. Since both types have only one value, there are no operators on these types. These types exist to represent the absence of data, and their difference is only in intent. • undefined represents data that is accidentally missing. • null represents data that is intentionally missing. In general, null is to be used over undefined in your scripts. undefined is given to you by the JavaScript interpreter in certain situations, and it is useful to be able to notice these situations when they appear. Listing 1 shows the difference between the two. Listing 1: Undefined and Null 1 var name; 2 // Will say"Hello undefined" 3 a l e r t( "Hello" + name); 4 5 name= prompt( "Do not answer this question" ); 6 // Will say"Hello null" 7 a l e r t( "Hello" + name); 1.2 Booleans The Boolean type has two values, true and false.
    [Show full text]
  • Loops Or Control Statement
    LOOPS OR CONTROL STATEMENT ITERATION CONTROL STATEMENT (LOOPING STATEMENT) • Program statement are executed sequentially one after another. In some situations, a block of code needs of times • These are repetitive program codes, the computers have to perform to complete tasks. • The following are the loop structures available in python • While statement • for ….loop statement • Nested loop statement while loop statement • A while loop statement in python programming language repeatedly executes a target statement as long as a given condition is true. • Syntax: • while expression: • statement(s) Examples of a while loop • Write a program to find the sum of number • n=int(input(“enter no”)) • s=0 OUTPUT • while(n>0): enter no 5 • s=s+n the sum is 15 • n=n-1 • print(“the sum is”,s) In while loop- Infinite loop Using else statement with while loops • Python supports have an else statement associated with a loop statement • If the else statement is used with a while loop, the else statement is executed when the condition false. Program to illustrate the else in while loop c=0 OUTPUT while c<3: print(“inside loop”) inside loop c=c+1 inside loop else: inside loop print(“outside loop”) outside loop for loop statement • The for loop is another repetitive control structure, and is used to execute a set of instructions repeatedly, until the condition becomes false. • The for loop in python is used to iterate over a sequence(list,tuple,string) or other iterable objects. Iterating over a sequence is called traversal. • Syntax: • for val in expression: • Body of the for loop String|Tuple| List| Dictionary collection range( ) range ([begin],end-1,[step_value]) • For VN in : for loop and for loop with else clause Difference between for and while loop Nested Loop Examples of Nested Loop.
    [Show full text]
  • GWBASIC User's Manual
    GWBASIC User's Manual User's Guide GW-BASIC User's Guide Chapters 1. Welcome Microsoft Corporation 2. Getting Started Information in this document is subject to change without 3. Reviewing and Practicing notice and does not represent a commitment on the part of 4. The Screen Editor Microsoft Corporation. The software described in this 5. Creating and Using Files document is furnished under a license agreement or 6. Constants, Variables, nondisclosure agreement. It is against the law to copy this Expressions and Operators software on magnetic tape, disk, or any other medium for any Appendicies purpose other than the purchaser's personal use. A. Error Codes and Messages © Copyright Microsoft Corporation, 1986, 1987. All rights B. Mathematical Functions reserved. C. ASCII Character Codes D. Assembly Language Portions copyright COMPAQ Computer Corporation, 1985 E. Converting Programs Simultaneously published in the United States and Canada. F. Communications G. Hexadecimal Equivalents Microsoft®, MS-DOS®, GW-BASIC® and the Microsoft logo H. Key Scan Codes are registered trademarks of Microsoft Corporation. I. Characters Recognized Compaq® is a registered trademark of COMPAQ Computer Glossary Corporation. DEC® is a registered trademark of Digital Equipment Corporation. User's Reference Document Number 410130001-330-R02-078 ABS Function ASC Function ATN Function GW-BASIC User's Reference AUTO Command Microsoft Corporation BEEP Statement BLOAD Command Information in this document is subject to change without BSAVE Command notice and does not represent a commitment on the part of Microsoft Corporation. The software described in this CALL Statement document is furnished under a license agreement or CDBL Function nondisclosure agreement.
    [Show full text]
  • The Formal Generation of Models for Scientific Simulations 1
    The formal generation of models for scientific simulations 1 Daniel Tang 2 September, 2010 1Submitted in accordance with the requirements for the degree of Phd 2University of Leeds, School of Earth and Environment The candidate confirms that the work submitted is his own and that appropriate credit had been given where reference has been made to the work of others. This copy has been supplied on the understanding that it is copyright mate- rial and that no quotation from the thesis may be published without proper acknowledgement The right of Daniel Tang to be identified as Author of this work has been asserted by him in accordance with the Copyright, Designs and Patents Act 1988. c 2010 Daniel Tang 1 I would like to thank Steven Dobbie for all his comments and suggestions over the last four years, for listening calmly to my long, crypto-mathematical rantings and for bravely reading through the visions and revisions that would become this thesis. I would also like to thank Nik Stott for providing much needed moti- vation and for his comments on the more important parts of this thesis. Thanks also to Jonathan Chrimes for supplying figures from the DYCOMS-II intercom- parison study, and to Wayne and Jane at Northern Tea Power for supplying the necessary coffee. Thanks go to Zen Internet for the loan of a computer for the stratocumulus experiment and to the Natural Environment Research Council for funding this research under award number NER/S/A/2006/14148. 2 Contents Preface 1 1 Introduction 2 1.1 Posing the question .
    [Show full text]