# Definition of Parameters

## Parameters are components of functions

Parameters identify values that are passed into a function. For example, a function to add three numbers might have three parameters. A function has a name, and it can be called from other points of a program. When that happens, the information passed is called an argument. Modern programming languages typically allow functions to have several parameters.

## Function Parameters

Each function parameter has a type followed by an identifier, and each parameter is separated from the next parameter by a comma. The parameters pass arguments to the function. When a program calls a function, all the parameters are variables. The value of each of the resulting arguments is copied into its matching parameter in a process call pass by value. The program uses parameters and returned values to create functions that take data as input, make a calculation with it and return the value to the caller.

## The Difference Between Functions and Arguments

The terms parameter and argument are sometimes used interchangeably. However, parameter refers to the type and identifier, and arguments are the values passed to the function. In the following C++ example, int a and int b are parameters, while 5 and 3 are the arguments passed to the function.

`int addition (int a, int b){  int r;  r=a+b;  return r;}`

`int main (){  int z;  z = addition (5,3);  cout << "The result is " << z;}`

## Value of Using Parameters

• Parameters allow a function to perform tasks without knowing the specific input values ahead of time.
• Parameters are indispensable components of functions, which programmers use to divide their code into logical blocks.
{"ft_lang_label":"__label__en","ft_lang_prob":0.7631645,"math_prob":0.94741994,"size":2179,"snap":"2020-10-2020-16","text_gpt3_token_len":414,"char_repetition_ratio":0.17793104,"word_repetition_ratio":0.0,"special_character_ratio":0.19642037,"punctuation_ratio":0.11764706,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9610169,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-04-03T23:32:57Z\",\"WARC-Record-ID\":\"<urn:uuid:f5eab4c5-cb25-4f1b-a561-497ae1f757b7>\",\"Content-Length\":\"99153\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:5d1b31a6-af20-4e24-8960-f2678f1de078>\",\"WARC-Concurrent-To\":\"<urn:uuid:b416fe26-35b8-4a9c-a75f-6bf2497d26f8>\",\"WARC-IP-Address\":\"151.101.250.114\",\"WARC-Target-URI\":\"https://www.thoughtco.com/definition-of-parameters-958124?utm_source=emailshare&utm_medium=social&utm_campaign=shareurlbuttons\",\"WARC-Payload-Digest\":\"sha1:FC5ATBDD47VSAUAXRLMQZAVDEA6IZT6U\",\"WARC-Block-Digest\":\"sha1:DIO6JOISEUTNPTGDHM4A5CUNQL4CY54T\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-16/CC-MAIN-2020-16_segments_1585370518767.60_warc_CC-MAIN-20200403220847-20200404010847-00344.warc.gz\"}"}