Discuss Forum

1. Suppose a C program has floating constant 1.414, what's the best way to convert this as 'float' data type?

  • A. (float) 1.414
  • B. (float) 1.414
  • C. (float) 1.414
  • D. (float) 1.414

Answer: Option C

Explanation:

#include "stdio.h"

int main()

{

printf("%d %d",sizeof(3.14F), sizeof(3.14L));

return 0;

}

Output: 4 16

 

উল্লেখ্য, Float এবং Integer Data Type এর জন্য কম্পিউটারে 4 Byte জায়গা প্রয়োজন। এছাড়া, Long Data Type এর জন্য 16 Byte জায়গা প্রয়োজন।


Post your comments here:

Name:
Mobile:
Email:(Optional)

» Your comments will be displayed only after manual approval.