Float number, C/C++ Programming

Assignment Help:

We can combine more than one variable on the same line i.e.

  float number1,number2,number3; etc

Sometimes we want to mix the variable types used on the same line, this could cause problems, consider the following calculation

     C = a/10.0;

If the variable C is int, and a is float, the result of a/10.0 should produce a float. This can not be assigned in a variable C since C is of type int. Within C we can convert the variable types by use of force conversion (casting). i.e.

    C = (int) ( a/10.0) ;

  This forces the result of a/10.0 to become an integer which is the correct type for the variable C.


Related Discussions:- Float number

Flowcharting, how to create a flowchart? can you help me in my assignment a...

how to create a flowchart? can you help me in my assignment about flowcharting ....

C++, write a c++ program for minimum shelf downloads

write a c++ program for minimum shelf downloads

Program for single int parameter, Write a function that has a single int pa...

Write a function that has a single int parameter n and returns an int: 0 if n is negative, otherwise 1. You are not allowed to simply check the integer value, and should use the fu

Lowest cost entry, code for solving optimal solution for matrix

code for solving optimal solution for matrix

C program for sorting of numbers , C Program for SORTING OF NUMBERS   ...

C Program for SORTING OF NUMBERS   main() {           int a[20],i,j,temp,n;           clrscr();           printf("ENTER THE MAXIMUM LIMIT: ");           scan

Html, world wide web commands

world wide web commands

What is the issue which auto_ptr objects address?, A: If you employ auto_pt...

A: If you employ auto_ptr objects you would not need to be concerned along with heap objects not being deleted even if the exception is thrown.

Design test program that tests the student, This is a test program that tes...

This is a test program that tests the Student and ITECH7603Class classes.     In this assignment you are provided with three input text files associated with this program:

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd