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

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

In C language what is a 'dangling pointer'?

630


Is multithreading possible in c?

560


.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }

702


Write a program to print fibonacci series using recursion?

581


how to count no of words,characters,lines in a paragraph.

3897






What does d mean?

575


What is an array in c?

589


to find the closest pair

1816


How can I get the current date or time of day in a c program?

647


What is difference between class and structure?

564


Why static variable is used in c?

548


What is the use of printf() and scanf() functions?

624


What does *p++ do? What does it point to?

608


What is time null in c?

579


Which is the memory area not included in C program? give the reason

1499