SlideShare a Scribd company logo
1 of 1
Exercises: 
1. Watch the BBC documentations “The Dream Machine – Giant Brains” and/or “History 
of Computers”. 
2. Create a program that converts decimal integral numbers into binary numbers and 
binary numbers into decimal integral numbers. - The program should have a menu etc. 
as well. 
3. Learn how you can get a memory view of a program running in the debugger. 
a) Which presentation of negative values (e.g. the -1) does your machine use in 
memory? If needed use screenshots to show this. 
4. What happens in your IDE if you divide by 0 in debug mode? What happens if you 
divide by 0 in a release-compiled executable on the console (w/o IDE)? 
5. Write a function that rounds a double value to an int value. Prove its functionality with 
some unit tests. 
6. Write a program that proves the “end of the precision” of the datatype float. How many 
digits can be represented “correctly”? If needed use screenshots to show this. 
Remarks: 
• Everything that was left unspecified can be solved as you prefer. 
• The usage of goto, C++11 extensions, as well as #pragmas is not allowed. The usage 
of global variables is not allowed. You mustn't use the STL (e.g. std::string), but 
std::cout, std::cin and belonging to manipulators can be used. You mustn't use new 
and delete! You are not allowed to use C++ references instead of pointers. 
• Avoid magic numbers and use constants where possible. 
• The results of the programming exercises need to be runnable applications! All 
programs have to be implemented as console programs. 
• The programs mustn't have any memory leaks! 
• The programs need to be robust, i.e. they should cope with erroneous input from the 
user. 
• You should be able to describe your programs after implementation. Comments are 
mandatory. 
• In documentations as well as in comments, strings or user interfaces make correct use 
of language (spelling and grammar)! 
• Don't send binary files (e.g. the contents of debug/release folders) with your solutions! 
Do only send source and project files. 
• Don't panic: In programming multiple solutions are possible. 
• If you have problems use the Visual Studio help (F1) or the Xcode help, books and the 
internet primarily. 
• Of course you can also ask colleagues; but it is of course always better, if you find a 
solution yourself.

More Related Content

What's hot

Introduction to flowcharts and algorithms
Introduction to flowcharts and algorithmsIntroduction to flowcharts and algorithms
Introduction to flowcharts and algorithmsasrctw
 
Python programming
Python programmingPython programming
Python programmingnoor_faiza
 
Are 64-bit errors real?
Are  64-bit errors real?Are  64-bit errors real?
Are 64-bit errors real?PVS-Studio
 
Factorial of a number in python
Factorial of a number in pythonFactorial of a number in python
Factorial of a number in pythonvarshachhajera
 

What's hot (7)

Introduction to flowcharts and algorithms
Introduction to flowcharts and algorithmsIntroduction to flowcharts and algorithms
Introduction to flowcharts and algorithms
 
Python programming
Python programmingPython programming
Python programming
 
Tdd like beethoven
Tdd like beethovenTdd like beethoven
Tdd like beethoven
 
How to code
How to codeHow to code
How to code
 
Are 64-bit errors real?
Are  64-bit errors real?Are  64-bit errors real?
Are 64-bit errors real?
 
Factorial of a number in python
Factorial of a number in pythonFactorial of a number in python
Factorial of a number in python
 
Error handling
Error handlingError handling
Error handling
 

Viewers also liked

Geografia Emotiva History Board Fondos
Geografia Emotiva History Board FondosGeografia Emotiva History Board Fondos
Geografia Emotiva History Board FondosBerta Rubio Faus
 
Regolamento contest bellezza_sostenibile
Regolamento contest bellezza_sostenibileRegolamento contest bellezza_sostenibile
Regolamento contest bellezza_sostenibilesilbi123
 
7 lucruri de facut până la 30 de ani
7 lucruri de facut până la 30 de ani7 lucruri de facut până la 30 de ani
7 lucruri de facut până la 30 de aniAndrei Ionut
 
Offdays tuto-mode manager-FR
Offdays tuto-mode manager-FROffdays tuto-mode manager-FR
Offdays tuto-mode manager-FRAzinao
 
Mineral treasures ( metal nonmetal)
Mineral treasures ( metal nonmetal)Mineral treasures ( metal nonmetal)
Mineral treasures ( metal nonmetal)Gyanbikash
 
Prepositions game
Prepositions gamePrepositions game
Prepositions gameN0RM4NR
 
Art Fro Kids
Art Fro KidsArt Fro Kids
Art Fro KidsDiwduce
 
Boletín de FERCOL LUBRICANTES SRL - Septiembre de 2013
Boletín de FERCOL LUBRICANTES SRL - Septiembre de 2013Boletín de FERCOL LUBRICANTES SRL - Septiembre de 2013
Boletín de FERCOL LUBRICANTES SRL - Septiembre de 2013Fercol Lubricantes S.R.L
 
Contents page reseach
Contents page reseachContents page reseach
Contents page reseachparkeyboy
 
Concurso de Artes Plásticas "Premio Pepe Espaliú, 2009"
Concurso de Artes Plásticas "Premio Pepe Espaliú, 2009"Concurso de Artes Plásticas "Premio Pepe Espaliú, 2009"
Concurso de Artes Plásticas "Premio Pepe Espaliú, 2009"Desirée Martín
 
Como guardar una imagen desde internet.
Como guardar una imagen desde internet.Como guardar una imagen desde internet.
Como guardar una imagen desde internet.Lening Flores Orrillo
 
Kisi kisi penulisan soal-engkos 2010
Kisi kisi penulisan soal-engkos 2010Kisi kisi penulisan soal-engkos 2010
Kisi kisi penulisan soal-engkos 2010EKO SUPRIYADI
 
8.1 estudios da rtp rdp
8.1 estudios da rtp rdp8.1 estudios da rtp rdp
8.1 estudios da rtp rdprita_nogueira
 

Viewers also liked (17)

San Mateo
San MateoSan Mateo
San Mateo
 
Geografia Emotiva History Board Fondos
Geografia Emotiva History Board FondosGeografia Emotiva History Board Fondos
Geografia Emotiva History Board Fondos
 
Regolamento contest bellezza_sostenibile
Regolamento contest bellezza_sostenibileRegolamento contest bellezza_sostenibile
Regolamento contest bellezza_sostenibile
 
7 lucruri de facut până la 30 de ani
7 lucruri de facut până la 30 de ani7 lucruri de facut până la 30 de ani
7 lucruri de facut până la 30 de ani
 
Offdays tuto-mode manager-FR
Offdays tuto-mode manager-FROffdays tuto-mode manager-FR
Offdays tuto-mode manager-FR
 
Url prezi
Url preziUrl prezi
Url prezi
 
Matematica 22
Matematica 22Matematica 22
Matematica 22
 
Mineral treasures ( metal nonmetal)
Mineral treasures ( metal nonmetal)Mineral treasures ( metal nonmetal)
Mineral treasures ( metal nonmetal)
 
Ranking Surf Iniciante
Ranking Surf InicianteRanking Surf Iniciante
Ranking Surf Iniciante
 
Prepositions game
Prepositions gamePrepositions game
Prepositions game
 
Art Fro Kids
Art Fro KidsArt Fro Kids
Art Fro Kids
 
Boletín de FERCOL LUBRICANTES SRL - Septiembre de 2013
Boletín de FERCOL LUBRICANTES SRL - Septiembre de 2013Boletín de FERCOL LUBRICANTES SRL - Septiembre de 2013
Boletín de FERCOL LUBRICANTES SRL - Septiembre de 2013
 
Contents page reseach
Contents page reseachContents page reseach
Contents page reseach
 
Concurso de Artes Plásticas "Premio Pepe Espaliú, 2009"
Concurso de Artes Plásticas "Premio Pepe Espaliú, 2009"Concurso de Artes Plásticas "Premio Pepe Espaliú, 2009"
Concurso de Artes Plásticas "Premio Pepe Espaliú, 2009"
 
Como guardar una imagen desde internet.
Como guardar una imagen desde internet.Como guardar una imagen desde internet.
Como guardar una imagen desde internet.
 
Kisi kisi penulisan soal-engkos 2010
Kisi kisi penulisan soal-engkos 2010Kisi kisi penulisan soal-engkos 2010
Kisi kisi penulisan soal-engkos 2010
 
8.1 estudios da rtp rdp
8.1 estudios da rtp rdp8.1 estudios da rtp rdp
8.1 estudios da rtp rdp
 

Similar to (6) cpp numeric representation_exercises

(4) cpp automatic arrays_pointers_c-strings_exercises
(4) cpp automatic arrays_pointers_c-strings_exercises(4) cpp automatic arrays_pointers_c-strings_exercises
(4) cpp automatic arrays_pointers_c-strings_exercisesNico Ludwig
 
Essential c notes singh projects
Essential c notes singh projectsEssential c notes singh projects
Essential c notes singh projectsSINGH PROJECTS
 
Programming using C++ - slides.pptx
Programming using C++ - slides.pptxProgramming using C++ - slides.pptx
Programming using C++ - slides.pptxHeadoftheDepartment
 
Go language presentation
Go language presentationGo language presentation
Go language presentationparamisoft
 
The Good, the Bad and the Ugly things to do with android
The Good, the Bad and the Ugly things to do with androidThe Good, the Bad and the Ugly things to do with android
The Good, the Bad and the Ugly things to do with androidStanojko Markovik
 
How to work with code blocks
How to work with code blocksHow to work with code blocks
How to work with code blocksTech Bikram
 
His162013 140529214456-phpapp01
His162013 140529214456-phpapp01His162013 140529214456-phpapp01
His162013 140529214456-phpapp01Getachew Ganfur
 
C plus plus for hackers it security
C plus plus for hackers it securityC plus plus for hackers it security
C plus plus for hackers it securityCESAR A. RUIZ C
 
Introduction-to-C-Part-1 (1).doc
Introduction-to-C-Part-1 (1).docIntroduction-to-C-Part-1 (1).doc
Introduction-to-C-Part-1 (1).docMayurWagh46
 
LKGtoPG - Basics of C Language
LKGtoPG - Basics of  C LanguageLKGtoPG - Basics of  C Language
LKGtoPG - Basics of C Languagelkgtopg jobs
 

Similar to (6) cpp numeric representation_exercises (20)

(4) cpp automatic arrays_pointers_c-strings_exercises
(4) cpp automatic arrays_pointers_c-strings_exercises(4) cpp automatic arrays_pointers_c-strings_exercises
(4) cpp automatic arrays_pointers_c-strings_exercises
 
Types of errors 2019
Types of errors 2019Types of errors 2019
Types of errors 2019
 
Essential c
Essential cEssential c
Essential c
 
Essential c notes singh projects
Essential c notes singh projectsEssential c notes singh projects
Essential c notes singh projects
 
Essential c
Essential cEssential c
Essential c
 
Essential c
Essential cEssential c
Essential c
 
Essential c
Essential cEssential c
Essential c
 
Programming using C++ - slides.pptx
Programming using C++ - slides.pptxProgramming using C++ - slides.pptx
Programming using C++ - slides.pptx
 
Unit ii
Unit   iiUnit   ii
Unit ii
 
Go language presentation
Go language presentationGo language presentation
Go language presentation
 
The Good, the Bad and the Ugly things to do with android
The Good, the Bad and the Ugly things to do with androidThe Good, the Bad and the Ugly things to do with android
The Good, the Bad and the Ugly things to do with android
 
C_Programming_Notes_ICE
C_Programming_Notes_ICEC_Programming_Notes_ICE
C_Programming_Notes_ICE
 
How to work with code blocks
How to work with code blocksHow to work with code blocks
How to work with code blocks
 
C++ for hackers
C++ for hackersC++ for hackers
C++ for hackers
 
His162013 140529214456-phpapp01
His162013 140529214456-phpapp01His162013 140529214456-phpapp01
His162013 140529214456-phpapp01
 
C plus plus for hackers it security
C plus plus for hackers it securityC plus plus for hackers it security
C plus plus for hackers it security
 
01CHAP_1.PPT
01CHAP_1.PPT01CHAP_1.PPT
01CHAP_1.PPT
 
Introduction-to-C-Part-1 (1).doc
Introduction-to-C-Part-1 (1).docIntroduction-to-C-Part-1 (1).doc
Introduction-to-C-Part-1 (1).doc
 
Learn C Language
Learn C LanguageLearn C Language
Learn C Language
 
LKGtoPG - Basics of C Language
LKGtoPG - Basics of  C LanguageLKGtoPG - Basics of  C Language
LKGtoPG - Basics of C Language
 

More from Nico Ludwig

Grundkurs fuer excel_part_v
Grundkurs fuer excel_part_vGrundkurs fuer excel_part_v
Grundkurs fuer excel_part_vNico Ludwig
 
Grundkurs fuer excel_part_iv
Grundkurs fuer excel_part_ivGrundkurs fuer excel_part_iv
Grundkurs fuer excel_part_ivNico Ludwig
 
Grundkurs fuer excel_part_iii
Grundkurs fuer excel_part_iiiGrundkurs fuer excel_part_iii
Grundkurs fuer excel_part_iiiNico Ludwig
 
Grundkurs fuer excel_part_ii
Grundkurs fuer excel_part_iiGrundkurs fuer excel_part_ii
Grundkurs fuer excel_part_iiNico Ludwig
 
Grundkurs fuer excel_part_i
Grundkurs fuer excel_part_iGrundkurs fuer excel_part_i
Grundkurs fuer excel_part_iNico Ludwig
 
(1) gui history_of_interactivity
(1) gui history_of_interactivity(1) gui history_of_interactivity
(1) gui history_of_interactivityNico Ludwig
 
(1) gui history_of_interactivity
(1) gui history_of_interactivity(1) gui history_of_interactivity
(1) gui history_of_interactivityNico Ludwig
 
New c sharp4_features_part_vi
New c sharp4_features_part_viNew c sharp4_features_part_vi
New c sharp4_features_part_viNico Ludwig
 
New c sharp4_features_part_v
New c sharp4_features_part_vNew c sharp4_features_part_v
New c sharp4_features_part_vNico Ludwig
 
New c sharp4_features_part_iv
New c sharp4_features_part_ivNew c sharp4_features_part_iv
New c sharp4_features_part_ivNico Ludwig
 
New c sharp4_features_part_iii
New c sharp4_features_part_iiiNew c sharp4_features_part_iii
New c sharp4_features_part_iiiNico Ludwig
 
New c sharp4_features_part_ii
New c sharp4_features_part_iiNew c sharp4_features_part_ii
New c sharp4_features_part_iiNico Ludwig
 
New c sharp4_features_part_i
New c sharp4_features_part_iNew c sharp4_features_part_i
New c sharp4_features_part_iNico Ludwig
 
New c sharp3_features_(linq)_part_v
New c sharp3_features_(linq)_part_vNew c sharp3_features_(linq)_part_v
New c sharp3_features_(linq)_part_vNico Ludwig
 
New c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_ivNew c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_ivNico Ludwig
 
New c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_ivNew c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_ivNico Ludwig
 
New c sharp3_features_(linq)_part_iii
New c sharp3_features_(linq)_part_iiiNew c sharp3_features_(linq)_part_iii
New c sharp3_features_(linq)_part_iiiNico Ludwig
 
New c sharp3_features_(linq)_part_ii
New c sharp3_features_(linq)_part_iiNew c sharp3_features_(linq)_part_ii
New c sharp3_features_(linq)_part_iiNico Ludwig
 

More from Nico Ludwig (20)

Grundkurs fuer excel_part_v
Grundkurs fuer excel_part_vGrundkurs fuer excel_part_v
Grundkurs fuer excel_part_v
 
Grundkurs fuer excel_part_iv
Grundkurs fuer excel_part_ivGrundkurs fuer excel_part_iv
Grundkurs fuer excel_part_iv
 
Grundkurs fuer excel_part_iii
Grundkurs fuer excel_part_iiiGrundkurs fuer excel_part_iii
Grundkurs fuer excel_part_iii
 
Grundkurs fuer excel_part_ii
Grundkurs fuer excel_part_iiGrundkurs fuer excel_part_ii
Grundkurs fuer excel_part_ii
 
Grundkurs fuer excel_part_i
Grundkurs fuer excel_part_iGrundkurs fuer excel_part_i
Grundkurs fuer excel_part_i
 
(2) gui drawing
(2) gui drawing(2) gui drawing
(2) gui drawing
 
(2) gui drawing
(2) gui drawing(2) gui drawing
(2) gui drawing
 
(1) gui history_of_interactivity
(1) gui history_of_interactivity(1) gui history_of_interactivity
(1) gui history_of_interactivity
 
(1) gui history_of_interactivity
(1) gui history_of_interactivity(1) gui history_of_interactivity
(1) gui history_of_interactivity
 
New c sharp4_features_part_vi
New c sharp4_features_part_viNew c sharp4_features_part_vi
New c sharp4_features_part_vi
 
New c sharp4_features_part_v
New c sharp4_features_part_vNew c sharp4_features_part_v
New c sharp4_features_part_v
 
New c sharp4_features_part_iv
New c sharp4_features_part_ivNew c sharp4_features_part_iv
New c sharp4_features_part_iv
 
New c sharp4_features_part_iii
New c sharp4_features_part_iiiNew c sharp4_features_part_iii
New c sharp4_features_part_iii
 
New c sharp4_features_part_ii
New c sharp4_features_part_iiNew c sharp4_features_part_ii
New c sharp4_features_part_ii
 
New c sharp4_features_part_i
New c sharp4_features_part_iNew c sharp4_features_part_i
New c sharp4_features_part_i
 
New c sharp3_features_(linq)_part_v
New c sharp3_features_(linq)_part_vNew c sharp3_features_(linq)_part_v
New c sharp3_features_(linq)_part_v
 
New c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_ivNew c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_iv
 
New c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_ivNew c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_iv
 
New c sharp3_features_(linq)_part_iii
New c sharp3_features_(linq)_part_iiiNew c sharp3_features_(linq)_part_iii
New c sharp3_features_(linq)_part_iii
 
New c sharp3_features_(linq)_part_ii
New c sharp3_features_(linq)_part_iiNew c sharp3_features_(linq)_part_ii
New c sharp3_features_(linq)_part_ii
 

Recently uploaded

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 

Recently uploaded (20)

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 

(6) cpp numeric representation_exercises

  • 1. Exercises: 1. Watch the BBC documentations “The Dream Machine – Giant Brains” and/or “History of Computers”. 2. Create a program that converts decimal integral numbers into binary numbers and binary numbers into decimal integral numbers. - The program should have a menu etc. as well. 3. Learn how you can get a memory view of a program running in the debugger. a) Which presentation of negative values (e.g. the -1) does your machine use in memory? If needed use screenshots to show this. 4. What happens in your IDE if you divide by 0 in debug mode? What happens if you divide by 0 in a release-compiled executable on the console (w/o IDE)? 5. Write a function that rounds a double value to an int value. Prove its functionality with some unit tests. 6. Write a program that proves the “end of the precision” of the datatype float. How many digits can be represented “correctly”? If needed use screenshots to show this. Remarks: • Everything that was left unspecified can be solved as you prefer. • The usage of goto, C++11 extensions, as well as #pragmas is not allowed. The usage of global variables is not allowed. You mustn't use the STL (e.g. std::string), but std::cout, std::cin and belonging to manipulators can be used. You mustn't use new and delete! You are not allowed to use C++ references instead of pointers. • Avoid magic numbers and use constants where possible. • The results of the programming exercises need to be runnable applications! All programs have to be implemented as console programs. • The programs mustn't have any memory leaks! • The programs need to be robust, i.e. they should cope with erroneous input from the user. • You should be able to describe your programs after implementation. Comments are mandatory. • In documentations as well as in comments, strings or user interfaces make correct use of language (spelling and grammar)! • Don't send binary files (e.g. the contents of debug/release folders) with your solutions! Do only send source and project files. • Don't panic: In programming multiple solutions are possible. • If you have problems use the Visual Studio help (F1) or the Xcode help, books and the internet primarily. • Of course you can also ask colleagues; but it is of course always better, if you find a solution yourself.