things to remember in c
Download
Skip this Video
Download Presentation
Things to Remember in C++

Loading in 2 Seconds...

play fullscreen
1 / 6

Things to Remember in C++ - PowerPoint PPT Presentation


  • 111 Views
  • Uploaded on

Things to Remember in C++. CSC 331. Note:. A character in C++ can be interpreted as a small integer (between 0 and 255). For this reason, C++ often treats a character like an integer. Note:.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Things to Remember in C++' - vlad


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
slide2

Note:

A character in C++ can be interpreted as a small integer (between 0 and 255). For this reason, C++ often treats a character like an integer.

slide3

Note:

In C++ the Boolean constants are true and false. Additionally, following traditional standards, any nonzero number is considered true, and zero is considered false.

slide4

Note:

When a variable is defined, it is not initialized. The programmer must initialize any variable requiring prescribed data when the function starts.

java initialization
Java initialization
  • Default initial values.
    • Integer: 0
    • Floating point: 0.0
    • Char: \u0000.
    • Boolean: false
    • Reference: null
  • Note: Unlike C++ these values will be given to all variables that are members of a class; however, local variables within a method that aren’t initialized will cause a compile-time error (unlike C++).
slide6

Note:

In C++

If a value is zero, it can be used as the logical value false.

If a value is not zero, it can be used as the logical value true.

Zero <===> False Nonzero <===> True

ad