Answer Posted / hr@tgksolutions.com
A function in C++ is a collection of statements designed to accept input, perform specific computations, and produce output. The primary purpose of a function is to group tasks that are frequently executed, which helps avoid code duplication. Instead of rewriting the same code for different inputs, you can simply call the function.
In essence, a function is a block of code that executes only when it is invoked.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What math functions are available for integers? For floating point?
What is a null pointer assignment error? What are bus errors, memory faults, and core dumps?
What is an auto variable in c?
What is the use of getch ()?
What are the types of functions in c?
What is the difference between Printf(..) and sprint(...) ?
What are global variables?
List some of the dynamic data structures in C?
Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above
What are the applications of c language?
What is array of pointers to string?
What does a function declared as pascal do differently?
What is data structure in c and its types?
How many header files are in c?
Is there any data type in c with variable size?