Docsity

Programming Fundamentals: Bitwise Manipulation, Assignment Operators, and Data Types, Slides of Computer Programming

Partial preview of the text

Download Programming Fundamentals: Bitwise Manipulation, Assignment Operators, and Data Types and more Slides Computer Programming in PDF only on Docsity!

Introduction to Programming

Lecture 22 Review

Bit wise Manipulation and Assignment Operator

Bit Manipulation Operators

&= Bitwise AND Assignment Operator |= Bitwise OR Assignment Operator ^= Bitwise Exclusive OR Assignment Operator

Assignment Operator

a &= b ; Same as a = a & b ;

Assignment Operator

a ^= b ; Same as a = a ^ b ;

Design Recipes  Analyze a problem statement, typically expressed as a word problem  Express its essence, abstractly and with examples  Formulate statements and comments in a precise language  Evaluate and revise the activities in the light of checks and tests.  PAY ATTENTION TO DETAIL Docsity.com

Symbolic Names

x i BasicPay HouseRent

Data types

 Whole numbers:

  • int, short, long, unsigned  Real Numbers (with decimal points)
  • float, double  Character data
  • char

ASCII Table

Arrays Collection of same data types

Modulus Operator

a % b ; 7 % 2 = 1 ; 100 % 20 = 0 ;

Compound Arithmetic Operators

+= -= *= /= %=

Logical Operators

AND &&

OR ||

Comparison Operators

a < b ; a <= b ; a == b ; a >= b ; a > b ; Docsity.com