+ 2
Tell me the output of this code.
#include <iostream> using namespace std; void printNumber(int x) { cout << "Prints an integer: " << x << endl; } void printNumber(float x) { cout << "Prints a float: " << x << endl; } int main() { int a = 16; float b = 54.541; printNumber(a); printNumber(b); }
2 Respuestas
+ 4
Prints an integer: 16
Prints a float: 54.541
0
That's simple
It just take a as integer and prints it value
and b as float and prints its value