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

Answer Posted / jit

In C if we write a program like
int main()
{
static int i = 5;
if (--i){
printf("%d ", i);
main(10);
}
}

It works but not in C++

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is object and class in oops?

682


Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)

1728


How do you use inheritance in unity?

678


What is abstraction with example?

712


What are the important components of cohesion?

637






What is polymorphism and why is it important?

651


What do you mean by variable?

666


What is abstraction encapsulation?

748


What is oops concept with example?

657


What language is oop?

672


Why do we need polymorphism in c#?

790


What does and I oop mean?

708


What is a function in oop?

714


What is pointer in oop?

628


What is polymorphism what are the different types of polymorphism?

648