#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

What is a sequence in c++?

0 Answers  


Is dev c++ a good compiler?

0 Answers  


Write a program that will count the number of digits in an input integer up to value MAX_VALUE (2147483647). Thus, for an input of 5837 the output should be 4 digits Make sure that your program works for the numbers 0, 1, and 10. For the number 0, the output should be 1 digit

2 Answers  


What about Virtual Destructor?

1 Answers   Virtusa,


What is the most useful programming language?

0 Answers  






What is the output of this prog. ? struct A { A(){ cout << \"A\"; } }; struct B { B(){ cout << \"B\"; } }; struct C { C(){ cout << \"C\"; } }; struct D { D(){ cout << \"D\"; } }; struct E : D { E(){ cout << \"E\"; } }; struct F : A, B { C c; D d; E e; F() : B(), A(),d(),c(),e() { cout << \"F\"; } };

2 Answers  


what is the behaviour of C and C++ compiler for the below statements. int *p; p = malloc(100); Is the behaviour same ? or different ?

2 Answers  


Write some differences between an external iterator and an internal iterator?

0 Answers  


a class that maintains a pointer to an object that is programatically accessible through the public interface is known as?

2 Answers   CTS,


Write a corrected statement in c++ so that the statement will work properly. if (4 < x < 11) y=2*x;

0 Answers  


Explain the concept of copy constructor?

0 Answers  


Should I learn c or c++ or c#?

0 Answers  


Categories