SlideShare a Scribd company logo
Paul Solt
iPhoneDev.tv
Numbers
The data behind our apps
Paul Solt
iPhoneDev.tv
Overview
•Integers (27)
•printf()
•Floating-point numbers (3.14)
•Math libraries
Paul Solt
iPhoneDev.tv
Integers
•char: ‘a’,‘b’,‘c’
•short: 32,000
•int: 2,000,000,000
•long: 9,000,000,000,000,000,000
•long long: 9,000,000,000,000,000,000
Paul Solt
iPhoneDev.tv
Integers
•char: ‘a’,‘b’,‘c’ (8 bits = 1 byte)
•short: 32,000 (16 bits)
•int: 2,000,000,000 (32 bits)
•long: 9,000,000,000,000,000,000 (32 or 64 bits)
•long long: 9,000,000,000,000,000,000 (64 bits)
Paul Solt
iPhoneDev.tv
Overflow
99999
99999
10000000
10000000
Paul Solt
iPhoneDev.tv
printf
•Formatted text
•Tokens
•n (i.e. newline or return)
%d int
%c char
%f float/double
%s char * (i.e. text)
%ld long
Paul Solt
iPhoneDev.tv
Math
8 + 4 * 2 = ?
(8 + 4) * 2 = ?
Paul Solt
iPhoneDev.tv
Integer Division
5 / 2 = ?
5 % 2 = ?
Paul Solt
iPhoneDev.tv
Integer Division
5 / 2 = 2
5 % 2 = 1
Paul Solt
iPhoneDev.tv
Floating-point Numbers
•float: 3.14
•double: 3.141592653
Paul Solt
iPhoneDev.tv
Floating-point Numbers
•float: 3.14 (32 bits)
•double: 3.141592653 (64 bits)
Paul Solt
iPhoneDev.tv
Math Library
#include <stdlib.h>
abs(-13); // absolute value
#include <math.h>
cos(60 * M_PI / 180.0); // radians
Paul Solt
iPhoneDev.tv
Review
•Integers
•printf()
•Floating-point numbers
•Math libraries
Paul Solt
iPhoneDev.tv
Ad

Recommended

Bab 6 bentuk geometri tiga dimensi
Bab 6 bentuk geometri tiga dimensi
Imahzamri
 
Mpmc unit-string manipulation
Mpmc unit-string manipulation
xyxz
 
Bayesian learning
Bayesian learning
EngReads
 
Cilindro
Cilindro
Bryan Sandoval
 
Network flow problems
Network flow problems
Dr Sandeep Kumar Poonia
 
Points regions proof2
Points regions proof2
ibmath
 
Adding Decimals
Adding Decimals
Chris James
 
Expanded Column Method Addition
Expanded Column Method Addition
Chris James
 
Hello world program
Hello world program
mohamedsaad24
 
Ford Fulkerson Algorithm
Ford Fulkerson Algorithm
Adarsh Rotte
 
Placevalue
Placevalue
mibial
 
RM FUNCIONAL
RM FUNCIONAL
Liliana Cavero
 
Circumference and area of cirlce
Circumference and area of cirlce
Adnan Firoz
 
Asymptotic Notation
Asymptotic Notation
mohanrathod18
 
Functions in Objective-C and C Programming
Functions in Objective-C and C Programming
Paul Solt
 
Api a scuola
Api a scuola
lauragallitognotta
 
Wk1to4
Wk1to4
raymondmy08
 
Cpu cycle
Cpu cycle
maciakl
 
Authoring tools worksheet
Authoring tools worksheet
Farid Diah
 
02 - Introduction to the cdecl ABI and the x86 stack
02 - Introduction to the cdecl ABI and the x86 stack
Alexandre Moneger
 
Python Yield
Python Yield
yangjuven
 
2장. Runtime Data Areas
2장. Runtime Data Areas
김 한도
 
Stack Frame Protection
Stack Frame Protection
Conferencias FIST
 
Smashing The Stack
Smashing The Stack
Daniele Bellavista
 
Introduction to Linux Exploit Development
Introduction to Linux Exploit Development
johndegruyter
 
Exploit techniques and mitigation
Exploit techniques and mitigation
Yaniv Shani
 
Introduction to pointers and memory management in C
Introduction to pointers and memory management in C
Uri Dekel
 
Addressing
Addressing
souravmoy
 
Reversing & Malware Analysis Training Part 4 - Assembly Programming Basics
Reversing & Malware Analysis Training Part 4 - Assembly Programming Basics
securityxploded
 
Low Level Exploits
Low Level Exploits
hughpearse
 

More Related Content

What's hot (6)

Hello world program
Hello world program
mohamedsaad24
 
Ford Fulkerson Algorithm
Ford Fulkerson Algorithm
Adarsh Rotte
 
Placevalue
Placevalue
mibial
 
RM FUNCIONAL
RM FUNCIONAL
Liliana Cavero
 
Circumference and area of cirlce
Circumference and area of cirlce
Adnan Firoz
 
Asymptotic Notation
Asymptotic Notation
mohanrathod18
 
Ford Fulkerson Algorithm
Ford Fulkerson Algorithm
Adarsh Rotte
 
Placevalue
Placevalue
mibial
 
Circumference and area of cirlce
Circumference and area of cirlce
Adnan Firoz
 

Viewers also liked (20)

Functions in Objective-C and C Programming
Functions in Objective-C and C Programming
Paul Solt
 
Api a scuola
Api a scuola
lauragallitognotta
 
Wk1to4
Wk1to4
raymondmy08
 
Cpu cycle
Cpu cycle
maciakl
 
Authoring tools worksheet
Authoring tools worksheet
Farid Diah
 
02 - Introduction to the cdecl ABI and the x86 stack
02 - Introduction to the cdecl ABI and the x86 stack
Alexandre Moneger
 
Python Yield
Python Yield
yangjuven
 
2장. Runtime Data Areas
2장. Runtime Data Areas
김 한도
 
Stack Frame Protection
Stack Frame Protection
Conferencias FIST
 
Smashing The Stack
Smashing The Stack
Daniele Bellavista
 
Introduction to Linux Exploit Development
Introduction to Linux Exploit Development
johndegruyter
 
Exploit techniques and mitigation
Exploit techniques and mitigation
Yaniv Shani
 
Introduction to pointers and memory management in C
Introduction to pointers and memory management in C
Uri Dekel
 
Addressing
Addressing
souravmoy
 
Reversing & Malware Analysis Training Part 4 - Assembly Programming Basics
Reversing & Malware Analysis Training Part 4 - Assembly Programming Basics
securityxploded
 
Low Level Exploits
Low Level Exploits
hughpearse
 
Debugging Applications with GNU Debugger
Debugging Applications with GNU Debugger
Priyank Kapadia
 
Virtual Machine Constructions for Dummies
Virtual Machine Constructions for Dummies
National Cheng Kung University
 
Advanced exploit development
Advanced exploit development
Dan H
 
Flags
Flags
CME
 
Functions in Objective-C and C Programming
Functions in Objective-C and C Programming
Paul Solt
 
Cpu cycle
Cpu cycle
maciakl
 
Authoring tools worksheet
Authoring tools worksheet
Farid Diah
 
02 - Introduction to the cdecl ABI and the x86 stack
02 - Introduction to the cdecl ABI and the x86 stack
Alexandre Moneger
 
Python Yield
Python Yield
yangjuven
 
2장. Runtime Data Areas
2장. Runtime Data Areas
김 한도
 
Introduction to Linux Exploit Development
Introduction to Linux Exploit Development
johndegruyter
 
Exploit techniques and mitigation
Exploit techniques and mitigation
Yaniv Shani
 
Introduction to pointers and memory management in C
Introduction to pointers and memory management in C
Uri Dekel
 
Reversing & Malware Analysis Training Part 4 - Assembly Programming Basics
Reversing & Malware Analysis Training Part 4 - Assembly Programming Basics
securityxploded
 
Low Level Exploits
Low Level Exploits
hughpearse
 
Debugging Applications with GNU Debugger
Debugging Applications with GNU Debugger
Priyank Kapadia
 
Advanced exploit development
Advanced exploit development
Dan H
 
Flags
Flags
CME
 
Ad

Similar to Numbers and Values in Objective-C and C Programming (20)

Basic arithmetic, instruction execution and program
Basic arithmetic, instruction execution and program
JyotiprakashMishra18
 
Python
Python
Wei-Bo Chen
 
C# What's next? (7.x and 8.0)
C# What's next? (7.x and 8.0)
Christian Nagel
 
Modern C++
Modern C++
Michael Clark
 
CNS__M4_MD5 Crypto graphyCNS__M4_MD5 Crypto graphyCNS__M4_MD5 Crypto graphy
CNS__M4_MD5 Crypto graphyCNS__M4_MD5 Crypto graphyCNS__M4_MD5 Crypto graphy
movocode
 
CSC103 Bits, Bytes & Binary
CSC103 Bits, Bytes & Binary
Richard Homa
 
Cryptographic Algorithms: DES and RSA
Cryptographic Algorithms: DES and RSA
aritraranjan
 
Lecture 2 introduction to Programming languages C.pptx
Lecture 2 introduction to Programming languages C.pptx
muhammadumairsoftwar
 
Acm aleppo cpc training second session
Acm aleppo cpc training second session
Ahmad Bashar Eter
 
Computer Programming Module 14 review--Math Functions and Strings
Computer Programming Module 14 review--Math Functions and Strings
Jackie Carson
 
Cryptography Symmetric Key Algorithm (CSE)
Cryptography Symmetric Key Algorithm (CSE)
SoumyaBhattacharyya14
 
C# 7.x What's new and what's coming with C# 8
C# 7.x What's new and what's coming with C# 8
Christian Nagel
 
COURSE INTRODUCTION TO C++ PROGRAMMING LANGUAGE (CONTINUATION)
COURSE INTRODUCTION TO C++ PROGRAMMING LANGUAGE (CONTINUATION)
CharlesABangura1
 
Python workshop intro_string (1)
Python workshop intro_string (1)
Karamjit Kaur
 
0-Slot14-15-16-Libraries.pdf
0-Slot14-15-16-Libraries.pdf
ssusere19c741
 
0-Slot21-22-Strings.pdf
0-Slot21-22-Strings.pdf
ssusere19c741
 
Lect1.pptx. This is one of make presentation.
Lect1.pptx. This is one of make presentation.
chaminifernando087
 
C# - What's next
C# - What's next
Christian Nagel
 
Graph500 and Green Graph500 benchmarks on SGI UV2000 @ SGI UG SC14
Graph500 and Green Graph500 benchmarks on SGI UV2000 @ SGI UG SC14
Yuichiro Yasui
 
Programming in c
Programming in c
vinothinisureshbabu
 
Basic arithmetic, instruction execution and program
Basic arithmetic, instruction execution and program
JyotiprakashMishra18
 
C# What's next? (7.x and 8.0)
C# What's next? (7.x and 8.0)
Christian Nagel
 
CNS__M4_MD5 Crypto graphyCNS__M4_MD5 Crypto graphyCNS__M4_MD5 Crypto graphy
CNS__M4_MD5 Crypto graphyCNS__M4_MD5 Crypto graphyCNS__M4_MD5 Crypto graphy
movocode
 
CSC103 Bits, Bytes & Binary
CSC103 Bits, Bytes & Binary
Richard Homa
 
Cryptographic Algorithms: DES and RSA
Cryptographic Algorithms: DES and RSA
aritraranjan
 
Lecture 2 introduction to Programming languages C.pptx
Lecture 2 introduction to Programming languages C.pptx
muhammadumairsoftwar
 
Acm aleppo cpc training second session
Acm aleppo cpc training second session
Ahmad Bashar Eter
 
Computer Programming Module 14 review--Math Functions and Strings
Computer Programming Module 14 review--Math Functions and Strings
Jackie Carson
 
Cryptography Symmetric Key Algorithm (CSE)
Cryptography Symmetric Key Algorithm (CSE)
SoumyaBhattacharyya14
 
C# 7.x What's new and what's coming with C# 8
C# 7.x What's new and what's coming with C# 8
Christian Nagel
 
COURSE INTRODUCTION TO C++ PROGRAMMING LANGUAGE (CONTINUATION)
COURSE INTRODUCTION TO C++ PROGRAMMING LANGUAGE (CONTINUATION)
CharlesABangura1
 
Python workshop intro_string (1)
Python workshop intro_string (1)
Karamjit Kaur
 
0-Slot14-15-16-Libraries.pdf
0-Slot14-15-16-Libraries.pdf
ssusere19c741
 
0-Slot21-22-Strings.pdf
0-Slot21-22-Strings.pdf
ssusere19c741
 
Lect1.pptx. This is one of make presentation.
Lect1.pptx. This is one of make presentation.
chaminifernando087
 
Graph500 and Green Graph500 benchmarks on SGI UV2000 @ SGI UG SC14
Graph500 and Green Graph500 benchmarks on SGI UV2000 @ SGI UG SC14
Yuichiro Yasui
 
Ad

Recently uploaded (20)

War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
 
2025_06_18 - OpenMetadata Community Meeting.pdf
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Priyanka Aash
 
cnc-processing-centers-centateq-p-110-en.pdf
cnc-processing-centers-centateq-p-110-en.pdf
AmirStern2
 
OWASP Barcelona 2025 Threat Model Library
OWASP Barcelona 2025 Threat Model Library
PetraVukmirovic
 
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Alliance
 
The Future of Technology: 2025-2125 by Saikat Basu.pdf
The Future of Technology: 2025-2125 by Saikat Basu.pdf
Saikat Basu
 
Securing Account Lifecycles in the Age of Deepfakes.pptx
Securing Account Lifecycles in the Age of Deepfakes.pptx
FIDO Alliance
 
The Future of Data, AI, and AR: Innovation Inspired by You.pdf
The Future of Data, AI, and AR: Innovation Inspired by You.pdf
Safe Software
 
The Future of AI Agent Development Trends to Watch.pptx
The Future of AI Agent Development Trends to Watch.pptx
Lisa ward
 
9-1-1 Addressing: End-to-End Automation Using FME
9-1-1 Addressing: End-to-End Automation Using FME
Safe Software
 
OpenPOWER Foundation & Open-Source Core Innovations
OpenPOWER Foundation & Open-Source Core Innovations
IBM
 
"Database isolation: how we deal with hundreds of direct connections to the d...
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays
 
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
 
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
 
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
Priyanka Aash
 
“Key Requirements to Successfully Implement Generative AI in Edge Devices—Opt...
“Key Requirements to Successfully Implement Generative AI in Edge Devices—Opt...
Edge AI and Vision Alliance
 
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Alliance
 
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
 
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC
 
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
 
2025_06_18 - OpenMetadata Community Meeting.pdf
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Priyanka Aash
 
cnc-processing-centers-centateq-p-110-en.pdf
cnc-processing-centers-centateq-p-110-en.pdf
AmirStern2
 
OWASP Barcelona 2025 Threat Model Library
OWASP Barcelona 2025 Threat Model Library
PetraVukmirovic
 
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Alliance
 
The Future of Technology: 2025-2125 by Saikat Basu.pdf
The Future of Technology: 2025-2125 by Saikat Basu.pdf
Saikat Basu
 
Securing Account Lifecycles in the Age of Deepfakes.pptx
Securing Account Lifecycles in the Age of Deepfakes.pptx
FIDO Alliance
 
The Future of Data, AI, and AR: Innovation Inspired by You.pdf
The Future of Data, AI, and AR: Innovation Inspired by You.pdf
Safe Software
 
The Future of AI Agent Development Trends to Watch.pptx
The Future of AI Agent Development Trends to Watch.pptx
Lisa ward
 
9-1-1 Addressing: End-to-End Automation Using FME
9-1-1 Addressing: End-to-End Automation Using FME
Safe Software
 
OpenPOWER Foundation & Open-Source Core Innovations
OpenPOWER Foundation & Open-Source Core Innovations
IBM
 
"Database isolation: how we deal with hundreds of direct connections to the d...
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays
 
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
 
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
 
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
Priyanka Aash
 
“Key Requirements to Successfully Implement Generative AI in Edge Devices—Opt...
“Key Requirements to Successfully Implement Generative AI in Edge Devices—Opt...
Edge AI and Vision Alliance
 
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Alliance
 
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
 
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC
 

Numbers and Values in Objective-C and C Programming