What is a function in c?

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


Please Help Members By Posting Answers For Below Questions

What math functions are available for integers? For floating point?

862


What is a null pointer assignment error? What are bus errors, memory faults, and core dumps?

1176


What is an auto variable in c?

967


What is the use of getch ()?

840


What are the types of functions in c?

756


What is the difference between Printf(..) and sprint(...) ?

1075


What are global variables?

869


List some of the dynamic data structures in C?

1009


Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above

909


What are the applications of c language?

835


What is array of pointers to string?

797


What does a function declared as pascal do differently?

814


What is data structure in c and its types?

813


How many header files are in c?

751


Is there any data type in c with variable size?

853