What is a function in c?

Answer Posted / glibwaresoftsolutions

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 are c header files?

783


What is calloc malloc realloc in c?

813


Is c is a procedural language?

815


What is declaration and definition in c?

761


How can this be legal c?

840


write a c program for swapping two strings using pointer

2325


explain what is a newline escape sequence?

877


Stimulate calculator using Switch-case-default statement for two numbers

2700


a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor

846


What is structure data type in c?

753


What is the difference between scanf and fscanf?

883


What is use of pointer?

782


What is the description for syntax errors?

841


How can a number be converted to a string?

905


A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none

956