What is the difference b/w main() in C language and main()
in C++.

Answer Posted / sagarika

In C language , main() does not return any value.
Hence there is no need of return type whereas in c++ main
returns the value. if there is no return type we should
specify it by writing the keyword void before main.

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

An arrangement of information in memory in such a way that it can be easily accessed and processed by a programming language a) string b) data structure c) pointers d) array

682


How can you increase the allowable number of simultaneously open files?

592


What are the 5 data types?

594


in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none

595


What is sizeof in c?

565






An instruction which is analysed and acted upon by the processor prior to the compiler going its work a) directive b) constructive c) constant d) absolute mode

603


What is the difference between struct and union in C?

566


What is the purpose of main( ) in c language?

612


What is New modifiers?

662


What does void main () mean?

724


What is the sizeof () a pointer?

543


What is the heap in c?

636


the process of defining something in terms of itself is called (or) in C it is possible for the functions to call themselves. A function called a) nested function b) void function c) recursive function d) indifinite function

754


Explain what does the format %10.2 mean when included in a printf statement?

769


Explain what is the benefit of using enum to declare a constant?

582