C++ Interview Questions & Answers part 5
If you divide one integer by another, you get an integer as a result.
A function is, in effect, a subprogram that can act on data and return a value. Every C++ program has at least one function— main(). When your program starts, main() is called automatically. main() might call other functions, some of which might call still others.
Q: – Why use unnecessary parentheses when precedence will determine which operators are acted on first?
A Although it is true that the compiler will know the precedence and that a programmer can look up the precedence order, code that is easy to understand is easier to maintain. .
Variables defined outside of any function have global scope and thus are available from any function in the program, including main().
Tabs, spaces, and newline characters (known as whitespace) have no effect on the program, although judicious use of whitespace can make the program easier to read.
Submitted By:-Ankur Goyal Email-ID: – email@example.com