Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



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

Answer / vignesh1988i

there is no difference between main() in both of the
languages...... in c++ we will see all intrerms of
objects.... thats all......

Is This Answer Correct ?    13 Yes 5 No

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

Answer / gganesh

In c, main function will execute starting itself.
In c++, main function will execute finally

Is This Answer Correct ?    2 Yes 2 No

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

Answer / ayush jindal

in c & c++
the main difference is that "c" is based on top to bottom
approach.in "c"languge the header file is used as
#include<stdio.h> its also programable language.

& in c++ is based on bottom upto top approach. in c++ the
header file is used as #include<iostream.h> is used. is
also based on "object oriented program".

Is This Answer Correct ?    4 Yes 5 No

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

Answer / ayush

there is no difference b/w in c & c++ in main() function.

Is This Answer Correct ?    2 Yes 3 No

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

Answer / 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

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

Answer / ppp

In c:
int main(){ void main(){
..... .......
..... OR ......
return 0; }
}

Is This Answer Correct ?    2 Yes 6 No

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

Answer / kishan gowda

Ther is a difference b/w c and c++ main()...After execution
of int main() in c it returns zero on null to the operating
system where as in c++ it returns 1 to the O.S.

Ex:
In c:
int main(){ void main(){
..... .......
..... OR ......
return 0; }
}
In C++:

int main(){ int main(){
..... .......
..... OR ......
return 1; }//by default it retruns 1.
}

Is This Answer Correct ?    5 Yes 12 No

Post New Answer

More C Interview Questions

what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;

0 Answers   L&T,


Why is python slower than c?

0 Answers  


main() { struct test { char c; int i; char m; } t1; printf("%d %d\n", sizeof(t1), sizeof(t1.c)); }

1 Answers   Vector, Vector India,


How can I invoke another program from within a C program?

8 Answers  


What are the types of pointers?

0 Answers  


Write a program on swapping (100, 50)

0 Answers   BPL,


With the help of using classes, write a program to add two numbers.

0 Answers   TCS,


How can my program discover the complete pathname to the executable from which it was invoked?

0 Answers  


What should malloc() do? Return a null pointer or a pointer to 0 bytes?

0 Answers  


I have seen function declarations that look like this

0 Answers  


The number of bytes of storage occupied by short, int and long are a) 2, 2 and 4 b) 2, 4 and 4 c) 4, 4 and 4 d) none

0 Answers  


How can I invoke another program or command and trap its output?

0 Answers  


Categories