SlideShare una empresa de Scribd logo
1 de 2
In order to force a conversion from one data type to another we can use:
a format controls
b unification
c upward compatibility
d casting
Solution
Answer is (d) casting
Casting is a way to convert a variable from one data type to another data type
Example.c
#include <stdio.h>
int main() {
int num = 5, den = 2;
double val;
val = (double) num / den;
printf("val= : %f ", val );
return 0;
}
here we convert variable num from int to double
output
val=2.5
In order to force a conversion from one data type to another we can us.docx

Más contenido relacionado

Más de rtodd101

In an aqueous solution of 0-020 M HCl under standard conditions (T-25.docx
In an aqueous solution of 0-020 M HCl under standard conditions (T-25.docxIn an aqueous solution of 0-020 M HCl under standard conditions (T-25.docx
In an aqueous solution of 0-020 M HCl under standard conditions (T-25.docxrtodd101
 
In a survey of a TriDelt chapter with 50 members- 24 were taking math.docx
In a survey of a TriDelt chapter with 50 members- 24  were taking math.docxIn a survey of a TriDelt chapter with 50 members- 24  were taking math.docx
In a survey of a TriDelt chapter with 50 members- 24 were taking math.docxrtodd101
 
In a preparation for a synthetic plant hormone I experiment- 1- Give a.docx
In a preparation for a synthetic plant hormone I experiment- 1- Give a.docxIn a preparation for a synthetic plant hormone I experiment- 1- Give a.docx
In a preparation for a synthetic plant hormone I experiment- 1- Give a.docxrtodd101
 
In 2012 Tony invests $35-000 in an activity for which he is not a mate.docx
In 2012 Tony invests $35-000 in an activity for which he is not a mate.docxIn 2012 Tony invests $35-000 in an activity for which he is not a mate.docx
In 2012 Tony invests $35-000 in an activity for which he is not a mate.docxrtodd101
 
In 1985 Ted Thomas took $6-000 of his savings- borrowed another $4-000 (2).docx
In 1985 Ted Thomas took $6-000 of his savings- borrowed another $4-000 (2).docxIn 1985 Ted Thomas took $6-000 of his savings- borrowed another $4-000 (2).docx
In 1985 Ted Thomas took $6-000 of his savings- borrowed another $4-000 (2).docxrtodd101
 
In 1985 Ted Thomas took $6-000 of his savings- borrowed another $4-000.docx
In 1985 Ted Thomas took $6-000 of his savings- borrowed another $4-000.docxIn 1985 Ted Thomas took $6-000 of his savings- borrowed another $4-000.docx
In 1985 Ted Thomas took $6-000 of his savings- borrowed another $4-000.docxrtodd101
 
In 1993 the 101st International Olympic Committee met in Monaco to sel.docx
In 1993 the 101st International Olympic Committee met in Monaco to sel.docxIn 1993 the 101st International Olympic Committee met in Monaco to sel.docx
In 1993 the 101st International Olympic Committee met in Monaco to sel.docxrtodd101
 
Implement a Linked List as a subclass of the abstract List class- Make.docx
Implement a Linked List as a subclass of the abstract List class- Make.docxImplement a Linked List as a subclass of the abstract List class- Make.docx
Implement a Linked List as a subclass of the abstract List class- Make.docxrtodd101
 
imagine a simple economy of freedonia that uses gold as its currency ( (1).docx
imagine a simple economy of freedonia that uses gold as its currency ( (1).docximagine a simple economy of freedonia that uses gold as its currency ( (1).docx
imagine a simple economy of freedonia that uses gold as its currency ( (1).docxrtodd101
 
In 1985 Ted Thomas took $6-000 of his savings- borrowed another $4-000 (1).docx
In 1985 Ted Thomas took $6-000 of his savings- borrowed another $4-000 (1).docxIn 1985 Ted Thomas took $6-000 of his savings- borrowed another $4-000 (1).docx
In 1985 Ted Thomas took $6-000 of his savings- borrowed another $4-000 (1).docxrtodd101
 

Más de rtodd101 (10)

In an aqueous solution of 0-020 M HCl under standard conditions (T-25.docx
In an aqueous solution of 0-020 M HCl under standard conditions (T-25.docxIn an aqueous solution of 0-020 M HCl under standard conditions (T-25.docx
In an aqueous solution of 0-020 M HCl under standard conditions (T-25.docx
 
In a survey of a TriDelt chapter with 50 members- 24 were taking math.docx
In a survey of a TriDelt chapter with 50 members- 24  were taking math.docxIn a survey of a TriDelt chapter with 50 members- 24  were taking math.docx
In a survey of a TriDelt chapter with 50 members- 24 were taking math.docx
 
In a preparation for a synthetic plant hormone I experiment- 1- Give a.docx
In a preparation for a synthetic plant hormone I experiment- 1- Give a.docxIn a preparation for a synthetic plant hormone I experiment- 1- Give a.docx
In a preparation for a synthetic plant hormone I experiment- 1- Give a.docx
 
In 2012 Tony invests $35-000 in an activity for which he is not a mate.docx
In 2012 Tony invests $35-000 in an activity for which he is not a mate.docxIn 2012 Tony invests $35-000 in an activity for which he is not a mate.docx
In 2012 Tony invests $35-000 in an activity for which he is not a mate.docx
 
In 1985 Ted Thomas took $6-000 of his savings- borrowed another $4-000 (2).docx
In 1985 Ted Thomas took $6-000 of his savings- borrowed another $4-000 (2).docxIn 1985 Ted Thomas took $6-000 of his savings- borrowed another $4-000 (2).docx
In 1985 Ted Thomas took $6-000 of his savings- borrowed another $4-000 (2).docx
 
In 1985 Ted Thomas took $6-000 of his savings- borrowed another $4-000.docx
In 1985 Ted Thomas took $6-000 of his savings- borrowed another $4-000.docxIn 1985 Ted Thomas took $6-000 of his savings- borrowed another $4-000.docx
In 1985 Ted Thomas took $6-000 of his savings- borrowed another $4-000.docx
 
In 1993 the 101st International Olympic Committee met in Monaco to sel.docx
In 1993 the 101st International Olympic Committee met in Monaco to sel.docxIn 1993 the 101st International Olympic Committee met in Monaco to sel.docx
In 1993 the 101st International Olympic Committee met in Monaco to sel.docx
 
Implement a Linked List as a subclass of the abstract List class- Make.docx
Implement a Linked List as a subclass of the abstract List class- Make.docxImplement a Linked List as a subclass of the abstract List class- Make.docx
Implement a Linked List as a subclass of the abstract List class- Make.docx
 
imagine a simple economy of freedonia that uses gold as its currency ( (1).docx
imagine a simple economy of freedonia that uses gold as its currency ( (1).docximagine a simple economy of freedonia that uses gold as its currency ( (1).docx
imagine a simple economy of freedonia that uses gold as its currency ( (1).docx
 
In 1985 Ted Thomas took $6-000 of his savings- borrowed another $4-000 (1).docx
In 1985 Ted Thomas took $6-000 of his savings- borrowed another $4-000 (1).docxIn 1985 Ted Thomas took $6-000 of his savings- borrowed another $4-000 (1).docx
In 1985 Ted Thomas took $6-000 of his savings- borrowed another $4-000 (1).docx
 

Último

Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesShubhangi Sonawane
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 

Último (20)

Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 

In order to force a conversion from one data type to another we can us.docx

  • 1. In order to force a conversion from one data type to another we can use: a format controls b unification c upward compatibility d casting Solution Answer is (d) casting Casting is a way to convert a variable from one data type to another data type Example.c #include <stdio.h> int main() { int num = 5, den = 2; double val; val = (double) num / den; printf("val= : %f ", val ); return 0; } here we convert variable num from int to double output val=2.5