Tutorial Downloads .com

Home

C/C++ Language Reference(C++ PDF )

This C++ tutorial covers the details of C/C++ Language Reference.In this PDF couers theC/C++ Language Reference describes the syntax, semantics, and IBM implementation of the C and C++ programming languages. Syntax and semantics constitute a complete specification of a programming language, but conforming implementations of a language specification can differ because of language extensions. The IBM implementations of C and C++ attest to the organic nature of programming languages, reflecting pragmatic considerations and advances in programming techniques. The language extensions to C and C++ reflect the changing needs of modern programming environments.

Contents
About This Reference . vii
The IBM Language Extensions . viii
Features Related to  GNUC and C++ . ix
Highlighting Conventions . ix
How to Read the Syntax Diagrams . ix
Chapter 1. Scope and Linkage . 1
Scope . 2
Local Scope . 3
Function Scope . 3
Function Prototype Scope . 3
Global Scope . 3
Class Scope . 4
Name Spaces of Identifiers . 4
Name Hiding . 5
Program Linkage . 6
Internal Linkage . 6
External Linkage . 7
No Linkage . 7
Linkage Specifications — Linking to Non-C++ Programs . 8
Name Mangling . 9
Chapter 2. Lexical Elements . 11
Tokens . 11
Punctuators . 11
Source Program Character Set . 12
Escape Sequences . 13
The Unicode Standard . 14
Trigraph Sequences . 15
Multibyte Characters . 16
Comments . 16
Identifiers . 18
Reserved Identifiers . 18
Case Sensitivity and Special Characters in Identifiers . 19
Predefined Identifiers . 19
Keywords . 20
Literals . 21
Boolean Literals . 21
Integer Literals . 21
Floating-Point Literals . 23
Complex Literals . 26
Character Literals . 26
String Literals . 27
Compound Literals . 29
Chapter 3. Declarations . 31
Declaration Overview . 31
Variable Attributes . 32
The __align Specifier . 34
Tentative Definitions . 35
Objects . 35
Storage Class Specifiers . 36
auto Storage Class Specifier . 37
extern Storage Class Specifier . 38
mutable Storage Class Specifier . 39
register Storage Class Specifier . 39
static Storage Class Specifier . 40
typedef . 42
Type Specifiers . 44
Type Names . 44
Type Attributes . 45
Compatible Types . 48
Simple Type Specifiers . 49
Compound Types . 53
Complex Types . 70
Type Qualifiers . 72
The const Type Qualifier . 73
The volatile Type Qualifier . 74
The restrict Type Qualifier . 75
The asm Declaration . 76
Incomplete Types . 78
Chapter4. Declarators . 79
Initializers . 80
Pointers . 81
Declaring Pointers . 82
Assigning Pointers . 82
Initializing Pointers . 83
Using Pointers . 83
Pointer Arithmetic . 84
Arrays . 85
Declaring Arrays . 87
Initializing Arrays . 89
Function Specifiers . 93
References . 94
Initializing References . 94
Chapter 5. Expressions and Operators 97
Operator Precedence and Associativity . 98
Lvalues and Rvalues . 101
Primary Expressions . 102
Identifier Expressions . 103
Integer Constant Expressions . 104
Parenthesized Expressions ( ) . 104
C++ Scope Resolution Operator :: . 105
Postfix Expressions . 106
Function Call Operator ( ) . 107
Array Subscripting Operator [ ] . 109
Dot Operator . 110
Arrow Operator -> . 110
The typeid Operator . 110
static_cast Operator . 112
reinterpret_cast Operator . 112
const_cast Operator . 114
dynamic_cast Operator . 115
Unary Expressions . 117
Increment ++ . 118
Decrement -- . 118
Unary Plus + . 119
Unary Minus - . 119
Logical Negation !. 119
Bitwise Negation ~ . 119
Address & . 120
Indirection * . 120
alignof Operator . 121
sizeof Operator . 121
typeof Operator . 123
Label Value Operator && . 124
C++ new Operator . 124
C++ delete Operator . 128
Cast Expressions . 129
Cast to a Union Type . 130
Binary Expressions . 131
Multiplication * . 132
Division / . 132
Remainder % . 132
Addition + . 132
Subtraction - . 133
 Bitwise Left and Right Shift <<>> . 133
Relational <><=>=. 134
Equality ==!= . 135
Bitwise AND & . 136
Bitwise Exclusive OR ^ . 136
Bitwise Inclusive OR | . 137
Logical AND && . 138
Logical OR || . 138
C++ Pointer to Member Operators .* ->* . 139
Conditional Expressions . 140
Typeof Conditional C Expressions . 140
Type of Conditional C++ Expressions . 141
Examples of Conditional Expressions . 141
Assignment Expressions . 142
Simple Assignment = . 142
Compound Assignment . 143
Comma Expressions . 144
C++ throw Expressions . 145
Chapter 6. Implicit Type Conversions 147
Integral and Floating-Point Promotions . 147
Standard Type Conversions . 148
Lvalue-to-Rvalue Conversions . 148
Boolean Conversions . 149
Integral Conversions . 149
Floating-Point Conversions . 150
Pointer Conversions . 150
Reference Conversions . 151
Pointer-to-Member Conversions . 152
Qualification Conversions . 152
Function Argument Conversions . 152
Other Conversions . 153
Arithmetic Conversions . 154
The explicit Keyword . 154
Chapter 7. Functions . 157
C++ Enhancements to C Functions . 157
Function Declarations . 158
C++ Function Declarations . 160
Function Attributes . 161
Examples of Function Declarations . 166
Function Definitions . 167
Ellipsis and void . 171
Examples of Function Definitions . 172
The main() Function . 173
Arguments to main . 173
Example of Arguments to main . 174
Calling Functions and Passing Arguments . 174
Passing Arguments by Value . 176
Passing Arguments by Reference. 176
Default Arguments in C++ Functions . 178
Restrictions on Default Arguments . 179
Evaluating Default Arguments . 179
Function Return Values . 180
Using References as Return Types . 181
Allocation and Deallocation Functions . 181
Pointers to Functions . 182
Inline Functions . 183
Nested Functions . 185
Chapter 8. Statements . 187
Labels . 187
Locally Declared Labels . 188
Labels as Values . 188
Expression Statements . 189
Resolving Ambiguous Statements in C++ . 189
Block Statement . 190
Statement Expressions . 191
if Statement . 191
switch Statement . 193
while Statement . 197
do Statement . 198
for Statement . 198
break Statement . 200
continue Statement . 201
return Statement . 202
Value of a return Expression and Function Value 203
goto Statement . 204
Computed goto . 205
Null Statement . 205
Chapter 9. Preprocessor Directives 207
Preprocessor Overview . 207
Preprocessor Directive Format . 208
Macro Definition and Expansion (#define) . 208
Object-Like Macros . 209
Function-Like Macros . 209
Scope of Macro Names (#undef) . 213
# Operator . 213
Macro Concatenation with the ## Operator . 214
Preprocessor Error Directive (#error) . 215
 Preprocessor Warning Directive (#warning) . 215
File Inclusion (#include) . 216
Specialized File Inclusion (#include_next) . 217
ISO Standard Predefined Macro Names . 217
Conditional Compilation Directives . 219
#if, #elif . 220
#ifdef . 220
#ifndef . 221
#else . 221
#endif . 221
Line Control (#line) . 222
Null Directive (#) . 223
Pragma Directives (#pragma) . 224
Standard Pragmas . 224
The_Pragma Operator . 224
Chapter 10 Namespaces . 227
Defining Namespaces . 227
Declaring Namespaces . 227
Creating a Namespace Alias . 227
Creating an Alias for a Nested Namespace . 228
Extending Namespaces . 228
Namespaces and Overloading . 229
Unnamed Namespaces . 229
Namespace Member Definitions . 231
Namespaces and Friends . 231
Using Directive . 232
The using Declaration and Namespaces . 232
Explicit Access . 233
Chapter.11  Overloading . 235
Overloading Functions . 235
Restrictions on Overloaded Functions . 236
Overloading Operators . 237
Overloading Unary Operators . 239
Overloading Increment and Decrement . 239
Overloading Binary Operators . 241
Overloading Assignments . 241
Overloading Function Calls . 243
Overloading Subscripting . 244
Overloading Class Member Access . 245
Overload Resolution . 245
Implicit Conversion Sequences . 247
Resolving Addresses of Overloaded Functions.248
Chapter 12 Classes . 251
Declaring Class Types . 251
Using Class Objects . 252
Classes and Structures . 253
Scope of Class Names . 254
Incomplete Class Declarations . 255
Nested Classes . 256
Local Classes . 258
Local Type Names . 259
Chapter 13 Class Members and Friends . 261
Class Member Lists . 261
Data Members . 262
Member Functions . 262
const and volatile Member Functions . 264
Virtual Member Functions . 264
Special Member Functions . 264
Member Scope . 265
Pointers to Members . 266
The this Pointer . 267
Static Members . 270
Using the Class Access Operators with Static Members . 270
Static Data Members .271
Static Member Functions . 273
Member Access . 274
Friends . 276
Friend Scope . 278
Friend Access . 281
Chapter .14 Inheritance . 283
Derivation . 285
Inherited Member Access . 288
Protected Members . 288
Access Control of Base Class Members . 289
The using Declaration and Class Members. 290
Overloading Member Functions from Base and Derived Classes . 291
Changing the Access of a Class Member . 293
Multiple Inheritance . 294
Virtual Base Classes . 295
Multiple Access . 296
Ambiguous Base Classes . 297
Virtual Functions . 300
Ambiguous Virtual Function Calls . 304
Virtual Function Access . 305
Abstract Classes . 306
Chapter 15 Special Member Functions . 309
Constructors and Destructors Overview. 309
Constructors . 310
Default Constructors . 311
Explicit Initialization with Constructors . 312
Initializing Base Classes and Members . 314
Construction Order of Derived Class Objects .317
Destructors . 318
Free Store . 321
Temporary Objects . 325
User-Defined Conversions . 326
Conversion by Constructor . 327
Conversion Functions . 329
Copy Constructors . 329
Copy Assignment Operators . 331
Chapter 16 Templates . 333
Template Parameters . 334
Type Template Parameters . 334
Non-Type Template Parameters . 334
Template Template Parameters . 335
Default Arguments for Template Parameters . 335
Template Arguments . 336
Template Type Arguments . 336
Template Non-Type Arguments . 336
Template Template Arguments . 338
Class Templates . 339
Class Template Declarations and Definitions . 341
Static Data Members and Templates . 341
Member Functions of Class Templates .  342
Friends and Templates . 342
Function Templates . 343
Template Argument Deduction . 344
Overloading Function Templates . 349
Partial Ordering of Function Templates . 350
Template Instantiation . 351
Implicit Instantiation . 351
Explicit Instantiation . 353
Template Specialization . 354
Explicit Specialization . 354
Partial Specialization . 358
Name Binding and Dependent Names . 361
The typename Keyword . 362
The Keyword template as Qualifier . 362
Chapter.17 Exception Handling . 365
The try Keyword . 365
Nested Try Blocks . 367
catch Blocks . 367
Function try block Handlers . 368
Arguments of catch Blocks . 371
Matching between Exceptions Thrown and Caught . 371
Order of Catching . 372
The throw Expression . 373
Rethrowing an Exception . 373
Stack Unwinding . 375
Exception Specifications . 376
Special Exception Handling Functions . 379
unexpected() . 379
terminate() . 380
set_unexpected() and set_terminate() . 381
Example Using the Exception Handling Functions . 382
Appendix A The IBM C Language Extensions . 385
Orthogonal Extensions . 385
Existing IBM C Extensions with Individual Option Controls . 385
IBM C Extensions: C99 Features as Extensions to C89 . 385
IBM C Extensions Related to GNU C . 387
Non-Orthogonal Extensions . 387
Existing IBM C Extensions with Individual Option Controls . 388
IBM C Extensions: C99 Features as Extensions to C89  .388
IBM C Extensions Related to GNU C . 388
Appendix B The IBM C++ Language Extensions . 389
Orthogonal Extensions . 389
IBM C++ Extensions for Compatibility with C99 .389
IBM C++ Extensions Related to GNU C . 390
IBM C++ Extensions Related to GNU C++ . 391
Non-Orthogonal Extensions . 391
IBM C++ Extensions for Compatibility with C99 .391
IBM C++ Extensions Related to GNU C . 391
Appendix C Predefined Macros Related to Language Features . 393
Notices . 397
Programming Interface Information . 399
Trademarks and Service Marks . 399
Industry Standards . 399
Index  .401.

 Read more about C/C++ Language Reference


Resource: http://www.hpc.lsu.edu/help/docs/c_cplus_language_reference.pdf
Posted By : Cyntia
On date : 07.31.08

Most used CPP Tutorials

CPP ( C++ ) Interview Questions & ANswers
What is encapsulation , What is inheritance , What is Polymorphism, What is constructor or ctor, What is destructor, When are copy constructors called, What is conversion constructor, What is Memory alignment, What is a dangling pointer, What is overloading, What is a Make file
C++ Tutorials ( Ebooks pdf files )
ANSI/ISO C++ Professional Programmer's Handbook ,C++ Essentials (PDF),More C++(PDF) ,C++ QUICK REFERENCE
C++ Tutorial. For Beginners
This usage-oriented online C++ tutorial is intended to help you get your C++ experience on the right foot. Using some Macromedia Flash animations where needed, you will find here all the required information to get efficiently started on your usage of C++ language, independently of the platform you are planning to use it on. After a short introduction aimed at getting you started with the required tools to write and build C++ code source into executable binaries, you will get thrown into the basics of C++ and its control structures, as an algorithmic starting point. Still oriented on the usability, you will be pointed, along with detailed explanations, to the C-style standard functions that can be used in your C++ source code to easien usual tasks. The tutorial will then lead you into the Object Oriented paradigm on C++ language, which will be a must-have in order to understand all the STL(Standard Template Library)-related info that you will find in the last part of this tutorial. After having followed this tutorial, you will be perfectly able to develop and understand Command-line applications written in C++.
A Complete C++ ( CPP ) Tutorial
This is a beginners tutorial on C++ programming. It covers object oriented programming and some C++ basics. You may also check out the C Programming tutorial to learn more on data types, loops, functions, etc. because this is almost similar to C++.
How to Program an 8-bit Microcontroller Using C language (C++ PDF)
This C++ tutorial covers the details of How to Program an 8-bit Microcontroller Using C language. In this PDF covers the Traditional,most 8-BIT embedded Programs have been written in assembly language however, due to a variety of reasons.
MPLAB MCC18 C-PROGRAMMING TUTORIAL
This C++ tutorial covers the details of MPLAB MCC18 C-PROGRAMMING TUTORIAL.IN this PDF covers Basic rules for programming in C,The structure of the program,Variable types,ETC....
C++ Language Tutorial
This tutorial is for those people who want to learn programming in C++ and do not necessarily have any previous knowledge of other programming languages. Of course any knowledge of other programming languages or any general computer skill can be useful to better understand this tutorial, although it is not essential. It is also suitable for those who need a little update on the new features the language has acquired from the latests standards. If you are familiar with the C language, you can take the first 3 parts of this tutorial as a review of concepts, since they mainly explain the C part of C++. There are slight differences in the C++ syntax for some C features, so I recommend you its reading anyway. The 4th part describes object-oriented programming. The 5th part mostly describes the new features introduced by ANSI-C++ standard.
MPLAB C18 C COMPILER USER’S GUIDE | PDF syudy material
This document discusses the technical details of the MPLAB® C18 compiler. This document will explain all functionality of the MPLAB C18 compiler. It assumes that the programmer already: • knows how to write C programs • knows how to use the MPLAB Integrated Development Environment (IDE) to create and debug projects • has read and understands the processor data sheet for which code is being written
C / C++ Language Reference | PDF study material
The C/C++ Language Reference describes the syntax, semantics, and IBM implementation of the C and C++ programming languages. Syntax and semantics constitute a complete specification of a programming language, but complete implementations can differ because of extensions. The IBM implementations of Standard C and Standard C++ attest to the organic nature of programming languages, reflecting pragmatic considerations and advances in programming techniques, which are factors that influence growth and change. The extensions in IBM C and C++ also reflect the changing needs of modern programming environments.
C Programming Tutorial (C++ PDF)
This C++ tutorial covers the details of C Programming Tutorial.IN This tutorial Every program is limited by the language which is used to write it. C is a programmer’s language. Unlike BASIC or Pascal, C was not written as a teaching aid, but as an implementation language. C is a computer language and a programming tool which has grown popular because programmers like it! It is a tricky language but a masterful one.
C/C++ Language Reference (C++ PDF)
This C++ tutorial covers the details of C/C++ Language Reference.In this PDF couers the C/C++ Language Reference describes the syntax, semantics, and IBM implementation of the C and C++ programming languages. Syntax and semantics constitute a complete specification of a programming language, but complete implementations can differ because of extensions. The IBM implementations of Standard C and Standard C++ attest to the organic nature of programming languages, reflecting pragmatic considerations and advances in programming techniques, which are factors that influence growth and change. The extensions in IBM C and C++ also reflect the changing needs of modern programming environments.
Accelerated C++ Practical Programming by Example
If you don't have a lot of time, but still want to learn the latest in C++, you don't have to learn C first. You might learn more by digging into current language features and classes from the very beginning. That's the approach that's offered by Accelerated C++, a text that delves into more advanced C++ features like templates and Standard Template Library (STL) collection classes early on. This book arguably can get a motivated beginning programmer into C++ more quickly than other available tutorials.
Effective C++ 55 Specific Ways to Improve Your Programs and Designs
This exceptionally useful text offers Scott Myers's expertise in C++ class design and programming tips. The second edition incorporates recent advances to C++ included in the ISO standard, including namespaces and built-in template classes, and is required reading for any working C++ developer.
C/C++ Language Reference(C++ PDF )
This C++ tutorial covers the details of C/C++ Language Reference.In this PDF couers theC/C++ Language Reference describes the syntax, semantics, and IBM implementation of the C and C++ programming languages. Syntax and semantics constitute a complete specification of a programming language, but conforming implementations of a language specification can differ because of language extensions. The IBM implementations of C and C++ attest to the organic nature of programming languages, reflecting pragmatic considerations and advances in programming techniques. The language extensions to C and C++ reflect the changing needs of modern programming environments.
MPLAB MCC18 C-PROGRAMMING TUTORIAL | PDF study material
This study guide describes the details of MPLAB MCC18 C-PROGRAMMING.

Latest added CPP Tutorials

The C++ Standard Library Tutorial and Reference
Programming with the C++ Standard Library can certainly be difficult, but Nicolai Josuttis's The C++ Standard Library provides one of the best available guides to using the built-in features of C++ effectively.
Accelerated C++ Practical Programming by Example
If you don't have a lot of time, but still want to learn the latest in C++, you don't have to learn C first. You might learn more by digging into current language features and classes from the very beginning. That's the approach that's offered by Accelerated C++, a text that delves into more advanced C++ features like templates and Standard Template Library (STL) collection classes early on. This book arguably can get a motivated beginning programmer into C++ more quickly than other available tutorials.
Learn Objective C on the Mac Tutorial Book
Take your coding skills to the next level with this extensive guide to Objective–C, the native programming language for developing sophisticated software applications for Mac OS X.
Effective C++ 55 Specific Ways to Improve Your Programs and Designs
This exceptionally useful text offers Scott Myers's expertise in C++ class design and programming tips. The second edition incorporates recent advances to C++ included in the ISO standard, including namespaces and built-in template classes, and is required reading for any working C++ developer.
C++ Primer Plus -5th edition tutorial Book
If you are new to C++ programming, C++ Primer Plus, Fifth Edition is a friendly and easy-to-use self-study guide.
C Programming Language - Tutorial Book
By using this Book any one can easily learn C Programming Language.This is the amazon review about this book "Just about every C programmer I respect learned C from this book. Unlike many of the 1,000 page doorstops stuffed with CD-ROMs that have become popular, this volume is concise and powerful (if somewhat dangerous) -- like C itself. And it was written by Kernighan himself. Need we say more?"
A C-language binding for PSL (C++ PDF)
This C++ tutorial covers the details of A C-language binding for PS.In this PDF covers the Assertions Based Verification (ABV) is an approach that is used by hardware design engineers to specify the functional properties of logic designs. Two popular languages based on ABV are the Property Specification Language PSL and the System- Verilog Assertion system SVA [1]. PSL is now an IEEE standard – P1850 [2]. PSL specifications can be used both for the design and for the verification processes. A single language can be used first for the functional specification of the design and later on as an input to the tools that verify the implementation. The backbone of PSL is Temporal Logic [3], [4]. Temporal Logic can describe the execution of systems in terms of logic formulas augmented by time-sequencing operators.
Objective-C Language and GNUstep Base Library Programming Manual (c++ pdf)
This C++ tutorial covers the details of Objective-C Language and GNUstep Base Library Programming Manual. In this PDF covers the aim of this manual is to introduce you to the Objective-C language and the GNUstep development environment, in particular the Base library. The manual is organised to give you a tutorial introduction to the language and APIs, by using examples whenever possible, rather than providing a lengthy abstract description. While Objective-C is not a diffcult language to learn or use, some of the terms may be unfamiliar, especially to those that have not programmed using an object-oriented programming language before. Whenever possible, concepts will be explained in simple terms rather than in more advanced programming terms, and comparisons to other languages will be used to aid in illustration.
How to Program an 8-bit Microcontroller Using C language (C++ PDF)
This C++ tutorial covers the details of How to Program an 8-bit Microcontroller Using C language. In this PDF covers the Traditional,most 8-BIT embedded Programs have been written in assembly language however, due to a variety of reasons.
PTU C Language Programmers Interface Model PTU-CPI
This C++ tutorial covers the details of PTU C Language Programmers Interface Model PTU-CPI.In this PDF couers the PTU C Language Interface (PTU-CPI) allows you to write custom programs that directly control PTU-D46-xx and PTU-D300-xx pan-tilts. Some feature highlights of the C Language Interface include: