I AM A USING A ARDUINO MEGA FOR THE FIRST TIME. I have very good experience with Arduino Uno. But this mega board which i have with me might be a cloned version. so just wondering what are the compatibility and basic issues one would face using cloned versions of Arduino
The big problem people have with the "clone" boards is that they often use a cheaper USB to serial adapter chip (usually the CH340) that requires the installation of a special driver. The board will not be recognized by the computer until you have installed that driver.
As far as your sketch goes though, there are no special considerations for using a clone. The same sketch will work for an official board and for a clone board.
As for "basic issues", well, just keep in mind that much of the tools, firmware, and documentation you are going to be using, and even this forum, was created by the Arduino company. The only way Arduino will be able to get highly qualified people to work full time on producing the resources that benefit all of us so much is by having the financial resources to pay them. If we want to ensure that continues to happen then we all need to find some way to contribute to that cause. Buying official boards is one way to do that, but certainly not the only option.
Ask again if you found your board not behaving like a Mega. Until then I'd assume that no problems arise with the board.
Known trouble maker is a CH340 chip instead of the AVR chip.
The error you have is down to your incomplete code!
You need a void setup() and a void loop() or a int main() even if you do not use them!
My clone didn't work until I installed the FTDI driver. Clone manufacturers changed their chipset as they could not obtain the chip the CH340 is designed for.
I thought i got the original board but instead got this clone version.