This document summarizes different data types in C programming language. It discusses integer data types like short, int, long and their signed and unsigned variants. It also covers character data type and floating point data types like float, double, long double. For each data type, it provides the storage size, value range and format specifier to print the values. The document encourages readers to solve quiz questions and contact the author in case of any doubts regarding the concepts covered.
Mesics lecture 3 c – constants and variableseShikshak
The document discusses various types of constants and variables in C programming. It describes primary constants like integer, real, and character constants and defines rules for constructing each type. Secondary constants include arrays, pointers, structures, and unions. Variables represent unknown values that can change during program execution. The document outlines naming conventions and rules for defining variables. It also covers C data types like integer, floating point, characters, and void and provides details on their sizes and ranges. Initialization of variables through assignment at declaration or dynamically at runtime is also summarized.
There are three primary data types in C - char, int, and float. Programmers can derive many other data types from these. For integers, C offers short and long types which occupy 2 and 4 bytes respectively and have different value ranges. Integers can also be declared as signed or unsigned, changing whether negative values are allowed. Char values can also be signed or unsigned, affecting their range from -128 to 127 or 0 to 255. Floating point types include float, double, and long double with increasing range and memory usage.
This document discusses data types in the C programming language. It defines data types as declarations that determine the type and size of data for variables. There are two main classifications of data types - primitive/basic types and user-defined types. The primitive types covered are integer, floating point, character, and void. Integer types like short, int, long can be modified by size and sign modifiers. Floating point types store fractional values with varying precision. The char type represents single character values. Void is used when a function returns no value.
At the end of this lecture students should be able to;
Define Keywords / Reserve Words in C programming language.
Define Identifiers, Variable, Data Types, Constants and statements in C Programming language.
Justify the internal process with respect to the variable declaration and initialization.
Apply Variable Declaration and Variable initialization statement.
Assigning values to variables.
Apply taught concepts for writing programs.
This document discusses data types in C programming language. It describes the primary data types - int, float, and char. It then explains that there are additional data types like short int, long int, unsigned int, signed char, unsigned char, float, double, and long double. It discusses the ranges and memory usage of each data type. It also covers type conversions and casts that can occur during expressions and assignments.
The document discusses fundamental data types in C including integer, floating point, character, and void types. It describes how variables must be declared before use and explains basic type modifiers like short, long, and unsigned. The summary also covers integer storage sizes and ranges, floating point precision and representation, and type conversions in C using casts and arithmetic promotion.
Data types in C include primary (fundamental) types like integers and floating-point numbers, as well as derived and user-defined types. Primary types include integers of various sizes (char, short, int, long) that can be signed or unsigned, and floating-point types like float, double, and long double. Integer types have size and value ranges that depend on the machine, such as 8-bit char from -128 to 127. Floating-point types have prescribed sizes and precision levels. User can define their own types using typedef to create new type names, or enum to define enumeration types with named values.
This document provides an overview of the C programming language. It discusses the origins and development of C from the B programming language. Some key features and benefits of C discussed include its low-level capabilities as a second-generation language, structured programming approach, use of functions and libraries, and support for pointers, memory allocation, recursion, and bit manipulation. The document also covers C's fundamental and derived data types, defining variables and strings, and the structure of C functions including single-level functions.
This document provides an overview of programming in C, including:
1) The objectives are to learn about the benefits and features of C, data types in C, C functions, input-output functions, and constructs in C.
2) C was developed from the B programming language by Dennis Ritchie and combines low-level capabilities of second-generation languages with high-level features like loops from third-generation languages.
3) C offers modular programming through block-structured functions that can be used as building blocks for more advanced functions.
C++ provides several fundamental and derived data types to store and represent different types of data. Fundamental data types include integers, characters, floats, doubles, and void. Integers can be further classified as short, int, long and modified with signed or unsigned. Characters can also be signed or unsigned. Floats and doubles represent real numbers with different levels of precision. Derived data types include arrays to store multiple values of the same type, structures to group different data types, unions to access memory in different types, enumerations to define named integer constants, classes to define user-defined types with methods and pointers to reference memory locations.
This document discusses variables and fundamental data types in C programming. It explains that variables are used to store temporary values during program execution and must be declared before use. It also covers the different fundamental data types like int, char, float, and double, and how they are represented and used. Integer, floating point, and character constants are also explained.
Data types in C include integer, long, short, char, and double. Integer types can be signed or unsigned and their range depends on whether the compiler is 16-bit or 32-bit. Char requires 1 byte and represents a character with a range of -128 to 127. Double occupies 8 bytes with a range of -1.7e308 to +1.7e308 and is used to store floating point numbers. The document also provides examples of declaring different data types and their format specifiers used in scanf and printf statements.
This document provides an overview of data types in C programming, including:
1) It describes four main types of data types - fundamental, modifiers, derived, and user defined. Fundamental types include integer, character, float, void. Modifiers change properties of other types. Derived types include arrays and pointers.
2) It explains the integer, float, character, and void fundamental data types in more detail. Integer can be short, int, long. Float and double store numbers in mantissa and exponent. Character represents keyboard characters.
3) Common C data type sizes and value ranges are provided for integer, float, and character types along with their modifiers like short, long, signed, unsigned.
A Closer Look at Data Types, Variables and ExpressionsInan Mashrur
This document discusses different data types in C programming including integer, floating point, character, and string types. It describes:
- Integer types like short, int, long which can be signed or unsigned. Integer values are whole numbers.
- Floating point types float, double, and long double which vary in precision. Float is suitable when precision is not critical.
- The char type represents a single character using 8 bits. Characters can be manipulated as integers.
- Type conversions and promotions that occur in expressions and assignments to avoid data loss. Explicit type casting is also described.
The document discusses various data types in C including integers, characters, and real numbers. It covers the range and size of different integer types like int, short int, long int, and their signed and unsigned variants. It also discusses how characters are represented and the behavior when integer values exceed the range. The document then covers storage classes like automatic, register, static, and external which determine how variables are stored and scope.
2. Variables and Data Types in C++ proramming.pptxAhmad177077
In C++, a variable is a named storage location in memory that can hold a value. Variables allow programmers to store, modify, and retrieve data during program execution. Each variable has a data type that defines the kind of data it can hold, such as integers, floating-point numbers, characters, etc.
This document contains a C programming assignment submitted by Vijayananda D Mohire for their Post Graduate Diploma in Information Technology. The assignment contains 11 questions on basic C programming concepts like data types, variables, functions, structures, file handling etc. For each question, the code for the algorithm/program is provided as the answer. The questions cover topics like checking odd/even numbers, calculating sum of numbers, interest calculation, number divisibility, swapping values, month to word conversion using switch case, structure to store employee data, reading and writing to files.
C Tutorial, Clanguage,
C Programming Tutorial
C - Home
C - Overview
C - Environment Setup
C - Program Structure
C - Basic Syntax
C - Data Types
C - Variables
C - Constants
C - Storage Classes
C - Operators
C - Decision Making
C - Loops
C - Functions
C - Scope Rules
C - Arrays
C - Pointers
C - Strings
C - Structures
C - Unions
C - Bit Fields
C - Typedef
C - Input & Output
C - File I/O
C - Preprocessors
C - Header Files
C - Type Casting
C - Error Handling
C - Recursion
C - Variable Arguments
C - Memory Management
C - Command Line Arguments
The document discusses various C++ data types including built-in, derived, and user-defined data types. It describes the different built-in data types like int, char, float, double, void and their properties. It also discusses derived data types like arrays, functions, pointers, references, and constant. The document further explains user-defined data types like structures, unions and classes/objects in C++.
This document discusses various data types in C including integers (int, short, long, unsigned), floating point numbers (float, double, long double), characters (char), and constants (const). It provides details on the declaration, range, and storage of each data type. Key points covered include integer overflow, floating point precision and range, special characters, and why multiple numeric types are needed rather than just using doubles for all numbers.
This document summarizes the basic types in C including integer types, floating types, and character types. It discusses integer types like short, int, long, and their signed and unsigned variants. It also covers floating point types float, double, long double. Character types are discussed along with escape sequences and character operations. Integer constants, floating constants, and the sizeof operator are also summarized.
This presentation covers C++ data types, variables, constants, and input/output. It discusses the different fundamental data types in C++ like int, char, float, and bool. It also explains variables, which name memory locations, constants, which are values that don't change, and input/output streams like cout and cin. The goal is for students to understand these basic C++ concepts and be able to write simple programs.
The document provides information on fundamental C data types including bits, bytes, words, integers, floating point numbers, enumerated types, variables, type conversions, constants, and basic operators. It defines common data types like char, int, float, and double. It also covers typecasting, variable declaration, and basic arithmetic, logical, relational, and bitwise operators.
Gregory Felber is an accomplished underwater marine biologist dedicated to advancing ocean research and conservation. He has extensive work experience as a Research Associate at the Marine Life Institute, where he conducted comprehensive studies of coral reef ecosystems, and as a Field Surveyor at the Oceanic Conservation Society, where he collected critical data on marine biodiversity.
More Related Content
Similar to Lecture 2 introduction to Programming languages C.pptx (20)
This document provides an overview of the C programming language. It discusses the origins and development of C from the B programming language. Some key features and benefits of C discussed include its low-level capabilities as a second-generation language, structured programming approach, use of functions and libraries, and support for pointers, memory allocation, recursion, and bit manipulation. The document also covers C's fundamental and derived data types, defining variables and strings, and the structure of C functions including single-level functions.
This document provides an overview of programming in C, including:
1) The objectives are to learn about the benefits and features of C, data types in C, C functions, input-output functions, and constructs in C.
2) C was developed from the B programming language by Dennis Ritchie and combines low-level capabilities of second-generation languages with high-level features like loops from third-generation languages.
3) C offers modular programming through block-structured functions that can be used as building blocks for more advanced functions.
C++ provides several fundamental and derived data types to store and represent different types of data. Fundamental data types include integers, characters, floats, doubles, and void. Integers can be further classified as short, int, long and modified with signed or unsigned. Characters can also be signed or unsigned. Floats and doubles represent real numbers with different levels of precision. Derived data types include arrays to store multiple values of the same type, structures to group different data types, unions to access memory in different types, enumerations to define named integer constants, classes to define user-defined types with methods and pointers to reference memory locations.
This document discusses variables and fundamental data types in C programming. It explains that variables are used to store temporary values during program execution and must be declared before use. It also covers the different fundamental data types like int, char, float, and double, and how they are represented and used. Integer, floating point, and character constants are also explained.
Data types in C include integer, long, short, char, and double. Integer types can be signed or unsigned and their range depends on whether the compiler is 16-bit or 32-bit. Char requires 1 byte and represents a character with a range of -128 to 127. Double occupies 8 bytes with a range of -1.7e308 to +1.7e308 and is used to store floating point numbers. The document also provides examples of declaring different data types and their format specifiers used in scanf and printf statements.
This document provides an overview of data types in C programming, including:
1) It describes four main types of data types - fundamental, modifiers, derived, and user defined. Fundamental types include integer, character, float, void. Modifiers change properties of other types. Derived types include arrays and pointers.
2) It explains the integer, float, character, and void fundamental data types in more detail. Integer can be short, int, long. Float and double store numbers in mantissa and exponent. Character represents keyboard characters.
3) Common C data type sizes and value ranges are provided for integer, float, and character types along with their modifiers like short, long, signed, unsigned.
A Closer Look at Data Types, Variables and ExpressionsInan Mashrur
This document discusses different data types in C programming including integer, floating point, character, and string types. It describes:
- Integer types like short, int, long which can be signed or unsigned. Integer values are whole numbers.
- Floating point types float, double, and long double which vary in precision. Float is suitable when precision is not critical.
- The char type represents a single character using 8 bits. Characters can be manipulated as integers.
- Type conversions and promotions that occur in expressions and assignments to avoid data loss. Explicit type casting is also described.
The document discusses various data types in C including integers, characters, and real numbers. It covers the range and size of different integer types like int, short int, long int, and their signed and unsigned variants. It also discusses how characters are represented and the behavior when integer values exceed the range. The document then covers storage classes like automatic, register, static, and external which determine how variables are stored and scope.
2. Variables and Data Types in C++ proramming.pptxAhmad177077
In C++, a variable is a named storage location in memory that can hold a value. Variables allow programmers to store, modify, and retrieve data during program execution. Each variable has a data type that defines the kind of data it can hold, such as integers, floating-point numbers, characters, etc.
This document contains a C programming assignment submitted by Vijayananda D Mohire for their Post Graduate Diploma in Information Technology. The assignment contains 11 questions on basic C programming concepts like data types, variables, functions, structures, file handling etc. For each question, the code for the algorithm/program is provided as the answer. The questions cover topics like checking odd/even numbers, calculating sum of numbers, interest calculation, number divisibility, swapping values, month to word conversion using switch case, structure to store employee data, reading and writing to files.
C Tutorial, Clanguage,
C Programming Tutorial
C - Home
C - Overview
C - Environment Setup
C - Program Structure
C - Basic Syntax
C - Data Types
C - Variables
C - Constants
C - Storage Classes
C - Operators
C - Decision Making
C - Loops
C - Functions
C - Scope Rules
C - Arrays
C - Pointers
C - Strings
C - Structures
C - Unions
C - Bit Fields
C - Typedef
C - Input & Output
C - File I/O
C - Preprocessors
C - Header Files
C - Type Casting
C - Error Handling
C - Recursion
C - Variable Arguments
C - Memory Management
C - Command Line Arguments
The document discusses various C++ data types including built-in, derived, and user-defined data types. It describes the different built-in data types like int, char, float, double, void and their properties. It also discusses derived data types like arrays, functions, pointers, references, and constant. The document further explains user-defined data types like structures, unions and classes/objects in C++.
This document discusses various data types in C including integers (int, short, long, unsigned), floating point numbers (float, double, long double), characters (char), and constants (const). It provides details on the declaration, range, and storage of each data type. Key points covered include integer overflow, floating point precision and range, special characters, and why multiple numeric types are needed rather than just using doubles for all numbers.
This document summarizes the basic types in C including integer types, floating types, and character types. It discusses integer types like short, int, long, and their signed and unsigned variants. It also covers floating point types float, double, long double. Character types are discussed along with escape sequences and character operations. Integer constants, floating constants, and the sizeof operator are also summarized.
This presentation covers C++ data types, variables, constants, and input/output. It discusses the different fundamental data types in C++ like int, char, float, and bool. It also explains variables, which name memory locations, constants, which are values that don't change, and input/output streams like cout and cin. The goal is for students to understand these basic C++ concepts and be able to write simple programs.
The document provides information on fundamental C data types including bits, bytes, words, integers, floating point numbers, enumerated types, variables, type conversions, constants, and basic operators. It defines common data types like char, int, float, and double. It also covers typecasting, variable declaration, and basic arithmetic, logical, relational, and bitwise operators.
Gregory Felber is an accomplished underwater marine biologist dedicated to advancing ocean research and conservation. He has extensive work experience as a Research Associate at the Marine Life Institute, where he conducted comprehensive studies of coral reef ecosystems, and as a Field Surveyor at the Oceanic Conservation Society, where he collected critical data on marine biodiversity.
OwnAir - Your Cinema Everywhere | Business PlanAlessandro Masi
Own Air is a film distributor specializing in tailored digital and day-and-date releases for quality independent and festival-driven content. This is a strategic deck for potential partnerships. This is a business plan for potential investors primarily. Copyright 2012. All rights reserved.
Overview: The document discusses advancements in car and home integration, focusing on glass technology, internships, and media hosting.
Part I Industry Focus
• Future designs emphasize the integration of glass technology in car and home development.
• The Model O stabilizes vehicle functions and enhances road handling through innovative systems refined by various renditions of model compositions
• Pull systems leverage renewable energy, contrasting with traditional push systems that rely on physical labor and fuel injection.
• Rotational internships train participants in portal projects, with 14,322 participants receiving certification for development of city portals.
Priming Tables
• Intern rotations involve a structured process of testing, reviewing, and redesigning models over 24 months.
• The table outlines the progression from beta models to final production books for both cars and homes.
Media Hosting
• Media hosting addresses simulation problems and enhances task delivery for advancing models.
• Foiling is necessary for controlling vehicle dynamics and ensuring a healthy driving environment.
Industrial Redevelopment
• Industrial redevelopment is crucial for media streaming and involves a significant number of participants in the internship program.
• The document highlights the importance of collaboration and training in the glass community for future developments.
https://www.slideshare.net/slideshow/summary-of-comments-on-conference-2-notes-for-car-and-home-show-pdf/279864505
Daniel E. Kaplan - Dedication To Financial ExcellenceDaniel E. Kaplan
Daniel E. Kaplan, a distinguished financial expert, is celebrated for his illustrious business career. With an unwavering commitment to ethical practices, he's earned recognition as a leading figure in finance. Daniel blends his supreme sophisticated education with specialized business insight.
Event Report - SAP Sapphire 2025 Orlando - Good work more to comeHolger Mueller
My key takeaways of SAP Sapphire 2025, Orlando, held from May 21st till 24th 2025 at the Orange County Convention Center. The best Sapphire under the leadership of Christian Klein, in terms of innovation, customer adoption, partner uptake, simplifcation and overall offering progress.
This presentation explores the capabilities of a state-of-the-art HVAC Filter Test Lab dedicated to evaluating air filters used in heating, ventilation, and air conditioning systems. It highlights critical testing services such as airflow resistance, dust holding capacity, particle capture efficiency, and filter life cycle analysis. The lab performs tests in accordance with global standards including ASHRAE 52.2, ISO 16890, and EN 779. Designed for filter manufacturers, building system engineers, and indoor air quality professionals, the facility ensures filters meet performance, energy efficiency, and health safety requirements for residential, commercial, and industrial HVAC systems.
An overview of the global bubble tea market, covering key trends, growth drivers, challenges, and future prospects, with insights into consumer preferences and competitive dynamics.
Europe Toys Market Size, Share, Trends & Report | 2034GeorgeButtler
In 2024, the European toys market was valued at approximately USD 14.51 billion. It is forecasted to grow at a CAGR of 2.70% between 2025 and 2034, reaching nearly USD 18.94 billion by the end of the period. This growth is driven by increasing consumer demand, changing trends in children's entertainment, and continuous innovation in toy design and features. These factors are expected to significantly contribute to the steady expansion of the toys market across Europe over the coming years.
Smart Support, Virtually Delivered: Powering Productivity with OnestopDAOnestopDA
In today’s fast-paced digital world, administrative efficiency is key to business success. This presentation explores how Virtual Administrative Support is revolutionizing operations for startups, small businesses, and enterprises alike.
Through this session, discover how OnestopDA empowers organizations by providing expert remote assistance tailored to your business needs—freeing your team to focus on growth, innovation, and strategic goals.
We’ll cover the core responsibilities of virtual assistants, the technologies that streamline collaboration, and real-world success stories that showcase the transformative power of virtual support. Whether you're overwhelmed with admin tasks or looking to scale sustainably, OnestopDA offers a smart, flexible, and cost-effective solution.
In simple terms, a business is an organization or activity that aims to make money by producing or selling goods or services. It can be a commercial venture, industrial enterprise, or professional practice. Essentially, businesses provide a means to create economic value
Water Pump Market Size, Share and Forecast | 2025-2034GeorgeButtler
The global water pump market was valued at approximately USD 67.76 billion in 2024. Driven by rising demand across industrial, agricultural, and residential sectors, the market is expected to expand at a compound annual growth rate (CAGR) of 4.40% from 2025 to 2034. By the end of 2034, the market is projected to reach a value of USD 104.23 billion, reflecting steady growth fueled by infrastructure development, water management initiatives, and increasing investments in energy-efficient pumping technologies.
This presentation explores how FedEx institutionalized operational excellence through three powerful frameworks:
Total Quality Management (TQM)
Quality-Driven Management (QDM)
People-Service-Profit (PSP) philosophy.
It begins by introducing TQM as a foundation for FedEx’s process improvements and customer-centric approach. The presentation then highlights QDM—FedEx’s proprietary framework that combines TQM, Lean, and Six Sigma to create a data-driven, empowering environment for quality enhancement across all levels of the organization.
The heart of FedEx’s cultural and strategic model, the PSP philosophy, is examined next. This model asserts that putting employees first drives superior service, which ultimately results in strong profits.
The final slides integrate these systems, emphasizing how their alignment has helped FedEx maintain agility, consistency, and innovation in the face of global competition and market disruption.
Speaker notes and visuals—such as a PSP cycle diagram and a QDM/TQM improvement pyramid—enhance understanding, making this a powerful tool for leadership training, academic study, or operational benchmarking.
Mining Saudi Arabia Monthly Report May 2025Tendayi Mwayi
The May 2025 edition of our Monthly Report explores key developments in Saudi Arabia's mining sector, including gold production growth, foreign investment trends, and regulatory updates. Featured articles highlight sustainability initiatives, regional exploration breakthroughs, and insights from industry leaders shaping the Kingdom’s journey to becoming a global mining powerhouse.
2. Levels of Programming Languages
There are 3 levels of programming languages
i) High-Level Language
ii) Middle-Level Language
iii) Low-Level Language
3. A First Program (C )
#include <stdio.h>
int main(void)
{
printf("This is my first C program.n");
return(0);
}
statements
header
open and close braces mark
the beginning and end
makes input
and output available
to us
4. A First Program – What Does It
Do?
printf("This is my first C program.n");
return(0);
Prints the message
This is my first C program.
Ends the program Ends the line
5. White Space Characters
•The character that produces blank space
when printed is called a white space
character, e.g.
•Spaces
•Tabs
•New Lines
7. Data types and Sizes
•There are three main data types in
C/C++
i) Character char
ii) Integer int
iii) Floating Point float
8. Character data type
• Represented by char
• used for storing a character, digit or
special character.
• A character constant must be enclosed in
single quotations i.e. ‘A’, ‘1’ or ‘*’ etc.
• uses/occupies one byte( 8 bits) of
memory.
• character constant can be signed or
unsigned.
9. Character data type
•There are 3 types of character data type, i.e. char,
signed char and unsigned char. e.g.
•char age means signed char
•signed char code means signed char
•unsigned char value means unsigned char
•The value range of binary numbers in:
•Char -128 to 127 or 0 to 255
•signed char is from -128 to +127
•unsigned char is from 0 to 255
10. Integer data type
•Integer data type is represented by int
•used for storing Integers, i.e. numeric values
without decimal portions.
•RANGE: Store a value ranging from -32,768 to
+ 32,767
•MEMORY: 2 bytes of memory
•Integer data type is also represented as
•Short
•long
11. Integer data types
int 2 or 4 bytes
-32,768 to
32,767 or -
2,147,483,648
to
2,147,483,647
short 2 bytes
-32,768 to
32,767
long 4 bytes
-2,147,483,648
to
2,147,483,647
Type Storage size Value Range
12. Integer data type
•Another int type is signed int which is used to
store sign too along with the numeric value.
•Another int type is unsigned int which is used
to store values without sign
•So, there are 9 types of Integer data types, i.e.
int, short, signed int, unsigned int, signed
short, unsigned short, long, signed long and
unsigned long e.g.
13. Type Storage size Value range
char 1 byte
-128 to 127 or 0 to
255
unsigned char 1 byte 0 to 255
signed char 1 byte -128 to 127
int 2 or 4 bytes
-32,768 to 32,767 or
-2,147,483,648 to
2,147,483,647
unsigned int 2 or 4 bytes
0 to 65,535 or 0 to
4,294,967,295
short 2 bytes -32,768 to 32,767
unsigned short 2 bytes 0 to 65,535
long 4 bytes
-2,147,483,648 to
2,147,483,647
unsigned long 4 bytes 0 to 4,294,967,295
14. Examples
•int a; means signed int
•signed int b; means signed int
•unsigned int c; means unsigned int
•short d; means signed short
•signed short e; means signed short
•unsigned short f; means unsigned short
•long g; means signed long
•signed long h; means signed long
•unsigned long I; means unsigned long
15. Float data type
•Float data type is represented by float and is used for
storing numeric values
•Means fraction or decimal portion.
•Float data type takes 4 bytes of memory.
• A floating point number is expressed in scientific
notation.
•The reason of storing float values in scientific notation
is that they can be very large or extremely small.
16. Float data type
•2000000000000000 = 2e+15
•0.00000000000023 = 2.3e-13
•A value written as 47e3 means 47 x 10^3
•Exponent value ranges from -38 to +38, i.e. 47x10^-
38 to 47x10^+38
•Another float type is double that takes 8 bytes of
memory.
•Exponent values in double ranges from -308 to + 308,
i.e. 47x10-308 to 47x10+308
17. Data types
Name Description Size* Range*
char Character or small integer. 1byte
signed: -128 to 127
unsigned: 0 to 255
short int
(short) Short Integer. 2bytes
signed: -32768 to 32767
unsigned: 0 to 65535
int Integer. 2bytes
signed: -32768 to 32767
unsigned: 0 to 65535
long int
(long) Long integer. 4bytes
signed: -2147483648 to 2147483647
unsigned: 0 to 4294967295
bool
Boolean value. It can take
one of two values: true or
false. 1byte true or false
float Floating point number. 4bytes +/- 3.4e +/- 38 (~7 digits)
double
Double precision floating
point number. 8bytes +/- 1.7e +/- 308 (~15 digits)
long double
Long double precision
floating point number. 8bytes +/- 1.7e +/- 308 (~15 digits)
18. Practice
• char myGrade = 'B';
• char a = 65, b = 66, c = 67;
• string greeting = "Hello";
• float f1 = 35e3;
• double d1 = 12E4;
• bool isCodingFun = true;
• bool isFishTasty = false;
Editor's Notes
#9: Uchar= 1 byte
short/unshort= 2 bytes
Int 4 bytes
Long 8 bytes
#10: the range of 8-bit unsigned binary numbers is from 0 to 25510 in decimal and from 00 to FF16 in hexadecimal. ...
The most significant bit of a binary number is used to represent the sign bit.