Lecture 2: Integers and Arithmetic Expressions - C++ PDF

Summary

This document contains lecture notes on integers and arithmetic expressions in C++. It includes examples and explanations of concepts like associativity and precedence in the context of C++ programming.

Full Transcript

3. Integers Evaluation of Arithmetic Expressions, Associativity and Precedence, Arithmetic Operators, Domain of Types int, unsigned int 64 Example: power8.cpp int a; // Input int r; // Result std::cout > a; r = a * a; // r =...

3. Integers Evaluation of Arithmetic Expressions, Associativity and Precedence, Arithmetic Operators, Domain of Types int, unsigned int 64 Example: power8.cpp int a; // Input int r; // Result std::cout > a; r = a * a; // r = a^2 r = r * r; // r = a^4 std::cout

Use Quizgecko on...
Browser
Browser