Skip to main content

Search form

Programming for Beginners Logo

Programming for Beginners

A Free Online Tutorial for Absolute Beginners
  • Home
  • Tutorials
  • Demos
FacebookTwitterGoogle PlusLinkedInPinterestReddit
Basics for Beginners > 8. The Type int > Exercises >

9. The Type int and Type Systems

Exercises

  1. What would be the result of executing the following piece of code?
        int x = 3.7:
        int y = 1.9;
        cout << x+y << endl;
    
  2. Click here for solutions


‹ Safe Automatic Conversions and Type of an Expression up 9. Functions ›

Basics for Beginners

  • 1. Introduction
  • 2. First Programs
  • 3. IDE
  • 4. Variables
  • 5. if and for Statements
  • 6. Debugger
  • 7. while and do-while Loops
  • 8. The Type int
    • Automatic Conversion
    • Explicit Conversion
    • Safe Automatic Conversions and Type of an Expression
    • Exercises
  • 9. Functions
  • Solutions

Theme Colors

  • bright

Copyright © 2015-2018. All rights reserved.