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 does d mean?

802


What is variables in c?

830


Write a program to compute the similarity between two strings - The program should get the two strings as input - Then it will output one single number which is the percentage of similarity between the two strings

2494


What is omp_num_threads?

851


which is conditional construct a) if statement b) switch statement c) while/for d) goto

1011


How can a number be converted to a string?

941


What is the difference between a string and an array?

945


What are qualifiers in c?

789


Write a program to print factorial of given number using recursion?

814


Write a program for Overriding.

939


in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.

7797


Explain 'bit masking'?

852


How can I find out the size of a file, prior to reading it in?

902


What are examples of structures?

821


Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?

808