Can we define function inside main in c++?



Can we define function inside main in c++?..

Answer / Km.nicky

Yes, you can define functions inside the 'main' function in C++. However, it is common practice to declare functions before they are used, outside of any function.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What is a hash function c++?

1 Answers  


What are the various operations performed on stack?

1 Answers  


Define whitespace in C++.

1 Answers   HCL,


Why do we use constructor?

1 Answers  


which of the following is not an secondary constant a) array b) real c) union

1 Answers  


How do we implement inheritance in c++?

1 Answers  


What are all predefined data types in c++?

1 Answers  


What is the most powerful coding language?

1 Answers  


What is meant by a delegate?

1 Answers  


Describe run-time type identification?

1 Answers  


How much do c++ programmers make?

1 Answers  


What is an adjust field format flag?

1 Answers  


Categories