answersLogoWhite

0

What is the size of Float?

Updated: 12/17/2022
User Avatar

Wiki User

10y ago

Best Answer

8 bytes

User Avatar

Wiki User

10y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the size of Float?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Will diamonds float in oil?

No. For their size, diamonds are heavy and will not float.


Does size matter when trying to float?

yes


Does a pumpkin float on water?

It depends on the bucket and the size of the pumpkin. Most pumpkins do float on water.


What is size of operator in c language?

it is used to know the memory size of variable of data type. Ex: float a; printf ("sizeof (a)= %d\n", sizeof (a)); or: printf ("sizeof (float)= %d\n", sizeof (float));


How do you create a program that will let the user to enter 10 numbers and arrange it in ascending and descending?

#include "stdio.h" #define ARRAY_SIZE 10 void fill(float* array, int size); void spill(float* array, int size, char* delimiter); void bubble_sort(float* array, int size); void reverse(float* array, int size); void swap(float* a, float* b); int main(int argc, char* argv[]) { float numbers[ARRAY_SIZE]; fill(numbers, ARRAY_SIZE); bubble_sort(numbers, ARRAY_SIZE); spill(numbers, ARRAY_SIZE, " "); reverse(numbers, ARRAY_SIZE); spill(numbers, ARRAY_SIZE, " "); return 0; } void fill(float* array, int size) { int i = 0; while (i < size) fscanf(stdin, "%f", array + (i++)); } void spill(float* array, int size, char* delimiter) { int i = 0; while (i < size) fprintf(stdout, "%f%s", array[i++], delimiter); fputc('\n', stdout); } void bubble_sort(float* array, int size) { int i, j; for (i = 0; i < size; i++) for (j = i; j < size; j++) if (array[i] > array[j]) swap(array + i, array + j); } void reverse(float* array, int size) { int i; for (i = size / 2; i >= 0; i--) swap(array + i, array + (size - (i + 1))); } void swap(float* a, float* b) { float c = *a; *a = *b; *b = c; } fill gets the numbers from input spill sends them to output bubble sort will sort the array in ascending order reverse will reverse the list so that it is in descending order swap is used to swap two floats You can change float to double or int depending on which datatype you want to use.


How will the memory be allocated in unions when 2 data types say int n float are declared?

A "Union" is a data type whose size will be determined by the member with largest size inside the union. So: union MyUnion{ int MyInteger; float MyFloat; }; MyUnion's size will be MyFloat's size, because that float is the largest sized member.


Difference between array and union?

All the members of the structure can be accessed at once,where as in an union only one member can be used at a time. Another important difference is in the size allocated to a structure and an union. for eg: struct example { int integer; float floating_numbers; } the size allocated here is sizeof(int)+sizeof(float); where as in an union union example { int integer; float floating_numbers; } size allocated is the size of the highest member. so size is=sizeof(float);


What is the size of an object determines whether it will float water?

The size of an object has little to do with whether it will float. Size relative to weight, or density, is what determines bouyancy. If the object weighs less than the amount of water it can displace, it floats.


Does the size of a parachute affect how long it will float in the air?

yes it does


Will a 1.3 cube float?

Whether or not it floats will depend on the material , not the size.


How does something float?

For a certain thing to float, it depends on the mass, weight and the size, . The lighter and smaller a thing is, the more its likely to float. The heavier an object, the more it is likely to stay on the ground. An object can float(or sink) in water, or even in the sky.


What size egg floats the best?

i think fat eggs float better cuz their size is easy to lift