Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

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

An introduction to programming concepts, focusing on bitwise manipulation and assignment operators. It covers the use of '&', '|', '^', '&=', '|=', and '^=' operators for bitwise operations, as well as the assignment operators '+=', '-=', '*=', '/=', and '%='. The document also discusses data types, including whole numbers, real numbers, and character data, and their respective sizes. Students will find this document useful for understanding the basics of programming and manipulating data using bitwise operators.

Typology: Slides

2011/2012

Uploaded on 11/06/2012

somo
somo 🇮🇳

4.8

(4)

70 documents

1 / 45

Toggle sidebar

Related documents


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 Docsity.com a Bit wise Manipulation and Assignment Operator Docsity.com Assignment Operator a &= b ; Same as a = a & b ; Docsity.com Assignment Operator a |= b ; Same as a = a | b ; Docsity.com Assignment Operator a ^= b ; Same as a = a ^ b ; Docsity.com { Symbolic Names X I Tolle hV) HouseRent Data types  Whole numbers: – int, short, long, unsigned  Real Numbers (with decimal points) – float, double  Character data – char Docsity.com int = 4 bytes char = 1 byte Docsity.com Arithmetic Operators Plus + Minus - Multiply * Divide / Modulus % Docsity.com Modulus Operator a % b ; 7 % 2 = 1 ; 100 % 20 = 0 ; Docsity.com Compound Arithmetic Operators += -= *= /= %= Docsity.com Comparison Operators a < b ; a <= b ; a == b ; a >= b ; a > b ; Docsity.com a = b; Docsity.com if ( a = b ) //Wrong //Logical Error Docsity.com am a Sequential Construct =» Decision Construct =» Loop Construct If-statement if ( condition ) { statement ( s ) ; } Docsity.com If-else if ( condition ) { statement ( s ) ; } else { statement ( s ) ; } Docsity.com if ( condition ) { statement ( s ) ; if ( condition ) { statement ( s ) ; } statement ( s ) ; } Docsity.com While Loops while ( a > b ) { statement ( s ) ; } Docsity.com While Loops While loop executes zero or more times Docsity.com For Loops for ( i = 0 ; i < 10 ; i ++ ; ) { statement ( s ) ; } Docsity.com  i = i + 1 ;  i += 1 ;  i ++ ; Docsity.com Switch Statement Docsity.com am a Call by value a Call by reference Arrays Docsity.com Arrays int a [ 10 ] ; a [ 0 ] ; : a [ 9 ] ; Docsity.com
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved