What is the output of print (int (3.79) +int(2.1))?

The output of the following program will be: 5

Because if you are adding two floating numbers but you are using the int data type, In this case, the int data type stores only integer numbers not float numbers. Hence the output is 5.

I will show you the output using the program in C language:

  1. #include<stdio.h> 
  2. int main() 
  3. { 
  4. int sum; 
  5. sum = (int (3.79) +int(2.1)); 
  6. printf("%d",sum); 
  7. } 


Comments

Popular posts from this blog

proassignment help backlink data index 41

Programming shark backlink data index 67

programming shark backink data index 31