A
Q. What happens if we execute the following code in C and C++?
Code:
#include<stdio.h>
struct STRUCT
{
int x;
int f()
{
printf("Welcom to StackHowTo
");
}
};
int main()
{
struct STRUCT s;
s.f();
return 0;
}
struct STRUCT
{
int x;
int f()
{
printf("Welcom to StackHowTo
");
}
};
int main()
{
struct STRUCT s;
s.f();
return 0;
}
- Correct Answer - Option(D)
- Views: 4
- Filed under category C++
- Hashtags:
Discusssion
Login to discuss.