Advertisement
#include <iostream>
int main() {
float a = 5.51;
int b = static_cast<int>(a);
std::cout << b;
}
- 6 will be printed on standard output, with no compilation warnings generated.
- 5 will be printed on standard output, with no compilation warnings generated.
- 6 will be printed on standard output, with compilation warnings generated.
- 5 will be printed on standard output, with compilation warnings generated.
Join our list
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.