Write any small program that will compile in "C" but not in "C++"

Showing Answers 1 - 4 of 4 Answers

Ruth Samuel

  • Aug 30th, 2005
 

There is nothing like that. A program written in C can be compiled in C++ also. Class declaration is not compulsary in C++ though it follows OOPS concept. 
But it needs at least one Class declaration for a Java program to be compiled.[LIST]null

  Was this answer useful?  Yes

Sajeesh

  • Jul 31st, 2007
 

int main()
{
   int class = 10;
   printf("%d", class);
  return 0;
}

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions