how does a main() in C++ is different from main() in C?

Answer Posted / vishal palan

In C the main() does not return any value by default. But in C++ the main() returns value int by default.
Again
In U can complie progm by writing main(){....}
But in C++ u have to return int main() {...return 0;}
or void main() {...}

Is This Answer Correct ?    16 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is pure oop?

685


Why we use classes in oop?

666


What is encapsulation in ict?

695


What are the benefits of interface?

677


Why do we use oop?

690






What is polymorphism what is it for and how is it used?

649


How to call a non virtual function in the derived class by using base class pointer

5568


IS IT NECESSARY TO INITIALIZE VARIABLE? WHAT IF THE INSTANCE VARIABLE IS DECLARED final ? IS IT NECESSARY TO INITIALIZE THE final VARIABLE AT THE TIME OF THEIR DECLARATION?

1668


write a program to enter a string like"sunil is a good boy and seeking for a job" not more than 10 characters including space in one line,rest characters should b in other line.if the next line starts from in between the previous word,then print whole word to next line.

1881


What is abstraction in oops?

673


What is difference between class and object with example?

673


What are the three parts of a simple empty class?

1606


Describe these concepts: Polymorphism, Inheritance and Abstraction.

702


Why do we use class in oops?

644


Whats oop mean?

679