Warning: implode(): Invalid arguments passed in /www/wwwroot/jobquiz.info/mdiscuss.php on line 336 What will be the output of the program? #include<stdio.h> #include<math.h> int main() { printf("%d, %d, %d\n", sizeof(3.14f), sizeof(3.14), sizeof(3.14l)); return 0; } ?->(Show Answer!)
1. What will be the output of the program? #include<stdio.h> #include<math.h> int main() { printf("%d, %d, %d\n", sizeof(3.14f), sizeof(3.14), sizeof(3.14l)); return 0; }
Ask Your Doubts Here
Comments
By: guest on 01 Jun 2017 06.01 pm
sizeof(3.14f) here '3.14f' specifies the float data type. Hence size of float is 4 bytes. sizeof(3.14) here '3.14' specifies the double data type. Hence size of float is 8 bytes. sizeof(3.14l) here '3.14l' specifies the long double data type. Hence size of float is 10 bytes. Note: If you run the above program in Linux platform (GCC Compiler) it will give 4, 8, 12 as output. If you run in Windows platform (TurboC Compiler) it will give 4, 8, 10 as output. Because, C is a machine dependent language.