Quiz · Functions · lesson 8 of 13
Quiz — which overload the compiler picks
What does the program print?
#include <iostream>
void print(int) { std::cout << "int"; }
void print(long) { std::cout << "long"; }
void print(double) { std::cout << "double"; }
int main() {
print(2.5f);
}Subscribe to take the course
The course is free. Sign in with Telegram and subscribe to the channel to open every lesson.