0% found this document useful (0 votes)
10 views4 pages

Toc

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views4 pages

Toc

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Table of Contents

Course Guide ix ă xiv

Topic 1: Introduction to Programming 1


1.1 Introduction and Definitions 2
1.2 Program Development Process 2
1.2.1 Problem Solving Phase 3
1.2.2 Implementation Phase 4
1.3 Introduction to C 6
1.3.1 Why C? 6
Summary 8
Key Terms 8

Topic 2: Installing and Using C 9


2.1 Installing C 10
2.2 Writing C Programs 15
1.2.1 Start Writing Programs Using Turbo C 15
Summary 18
Key Terms 18
 
Topic 3: Algorithm 19
3.1 Flow Chart 19
3.1.1 Start / End 20
3.1.2 Input / Output 20
3.1.3 Process 21
3.1.4 Condition 21
3.2 Pseudocode 22
3.3 Sequential Structure 22
3.4 Selection Structure 23
3.5 Repetition Structure 25
Summary 26
Key Terms 27
 
Topic 4: Programming Language 28
4.1 Types of Programming Language 28
4.1.1 Machine Language 29
4.1.2 Assembly Language 29
4.1.3 High-level Language 29
iv  TABLE OF CONTENTS

4.2 C Language 30
4.3 C Programming Environment 31
4.4 Memory and Storage in Computer 33
4.5 Character Representation 35
Summary 36
Key Terms 36

Topic 5: Data Types and Variables 37


5.1 Data Types 37
5.1.1 Integer Data Type (int)  38
5.1.2 Character Data Type (char)  38
5.1.3 Real Data Type (float, double)  39
5.2 Cell Size 39
5.3 Variables 41
5.3.1 Rules to Name a Variable 41
5.4 C Reserved Words and Standard Identifiers 42
5.5 Variable Declaration 43
5.6 Variable Assignments 44
Summary 46
Key Terms 46

Topic 6: Constants 47
6.1 Integer Constant 48
6.2 Floating Point Constants 48
6.3 Character Constant 49
6.4 Character Array Constant 50
6.5 Symbolic Constant 51
Summary 52
Key Terms 52

Topic 7: Input and Output 53 


  7.1  printf() Function 53
7.2 Displaying Integers 56
7.3 Displaying Characters 57
7.4 Displaying Real Numbers (float)  59
7.5 Displaying Character Array 60
  7.6  scanf() Function 61
7.7 Variable Input 61
Summary 63
Key Terms 63
TABLE OF CONTENTS  v

Topic 8: Operators and Expressions 64


8.1 Operators 64
8.2 Arithmetic Operators 65
8.2.1 Unary Arithmetic Operator 65
8.2.2 Binary Arithmetic Operator 66
8.3 Arithmetic Expressions 68
8.4 Assignment Statement 69
8.4.1 Compound Assignment Statement 70
8.5 Relational Operator 71
8.6 Logic Operator 72
Summary 73
Key Terms 73
 
Topic 9: Selection Control Structure 74
9.1 If Statement 74
    9.1.1  if Selection Structure 75
    9.1.2  if / else Selection Structure 76
9.1.3 Nested if Selection Structure 78
  9.2 Switch and Break Statement 79
9.3 Differences between If and Switch Statement 81
  Summary 83
Key Terms 83

Topic 10: Repetition 84


10.1 While Statement 84
10.2  Do-While Statement 87
10.3  For Statement 89
10.4  Continue Statement 91
10.5  Break Statement 92
Summary 94
Key Terms 94

Topic 11: Functions 95


11.1 What are Functions? 96
11.2 Function Definition 97
11.3 Function Prototype 99
11.4 Function Calls 102
11.4.1 Functions Without Return Type and Without
Parameters 102
11.4.2 Functions Without Return Type But With
Parameters 103
11.4.3 Functions With Return Type and With
vi  TABLE OF CONTENTS

Parameters 104
11.5 Library Functions for C 105
Summary 107
Key Terms 107
 
Topic 12: Files 108
12.1 File Support in C Programs 108
12.1.1 Binary File 109
12.1.2 Text File 109
12.2 File Operations 109
    12.2.1  fopen()  109 
    12.2.2  fclose()  111 
    12.2.3  fprintf()  112 
    12.2.4 fscanf()  113
Summary 116
Key Terms 116
 
   

You might also like