#include<iostream.h>
void main()
{
class x
{
public:
int func(int)
{
cout<<"cool";
return 1;
}
}
}



#include<iostream.h> void main() { class x { public: int func(int) { cout<<"..

Answer / m.shanmuga sundaram,rjnsoftwar

An user defined data type should end with a semi colon
otherwise returns "error syntax error : missing ';'
before '}'"

#include<iostream.h>

void main()
{
class x
{
public:
int func(int)
{
cout<<"cool";
return 1;
}
} ; /*An user defined data type should end with a
semi colon*/
}

Is This Answer Correct ?    13 Yes 7 No

Post New Answer

More C++ General Interview Questions

Difference between pass by value and pass by reference?

0 Answers  


What is main function in c++ with example?

0 Answers  


what is object?

7 Answers  


Can member data be public?

0 Answers  


What is static class data?

0 Answers  






What language is a dll written in?

0 Answers  


What is the topic of the C++ FAQ list?

1 Answers  


What is guard code in c++?

0 Answers  


#include<iostream.h> void main() { class x { public: int func(int) { cout<<"cool"; return 1; } } }

1 Answers   Infosys,


How many keywords are used in c++?

0 Answers  


What is Name Decoration?

2 Answers   Lucent,


How do you compile the source code with your compiler?

0 Answers  


Categories