0

What is the output of the following C program?

[gamipress_button type=”submit”  label=”Run Code Online” onclick=”window.open(‘https://coderseditor.com’,’_blank’)”]


class Test1 {
    int y;
};
  
class Test2 {
    int x;
    Test1 t1;
public:
    operator Test1() { return t1; }
    operator int() { return x; }
};
  
void fun ( int x)  { };
void fun ( Test1 t ) { };
  
int main() {
    Test2 t;
    fun(t);
    return 0;
}

 

Studently Answered question October 11, 2022