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

write string class as your own class in java without using any built-in function

2206


What is object-oriented programming? Webopedia definition

949


What is encapsulation oop?

792


They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?

1614


What is the use of oops?

796


What are functions in oop?

776


Explain the advantages of inheritance.

868


Write a program to implement OOPS concepts such as inheritance, polymorphism, friend function, operator overloading?

4469


What is pointer in oop?

727


Give two or more real cenario of virtual function and vertual object

2072


What is an example of genetic polymorphism?

866


can inline function declare in private part of class?

3964


Why it is called runtime polymorphism?

783


What is abstraction in oops with example?

991


Is html an oop?

777