What is the output of the following snippet?

Last Updated on May 3, 2022 by Admin 3

What is the output of the following snippet?

#include <iostream>

using namespace std;

int main()
{
    short s = 1;
    int i = 2;
    float f = 4.4;
    double d = 8.8;
  
    cout << s/i + f/i + d/s;
    return 0;
}
  • 11
  • Compilation fails
  • 6.6
  • 4.4
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments