The instruction that should replace /* Missing Loop Header */ so that the code segment works as intended is (c) counter < num.length()
<h3>Loops</h3>
The program is an illustration of loops (the while loop)
While loops are program statements that are used to perform repeated operations
For the string to return 23456, the while loop body must be repeated as long the counter is less than the length of the string num
Hence, the missing loop header is counter < num.length()
Read more about loops at:
brainly.com/question/15683939
A is the final answer! :)
Answer: The difference between call by value and call by reference is that in call by value the actual parameters are passed into the function as arguments whereas in call by reference the address of the variables are sent as parameters.
Explanation:
Some examples are:
call by value
#include <stdio.h>
void swap(int, int);
int main()
{ int a = 10, b= 20;
swap(a, b);
printf("a: %d, b: %d\n", a, b);
}
void swap(int c, int d)
{
int t;
t = c; c = d; d = t;
}
OUTPUT
a: 10, b: 20
The value of a and b remain unchanged as the values are local
//call by reference
#include <stdio.h>
void swap(int*, int*);
int main()
{
int a = 10, b = 20;
swap(&a, &b); //passing the address
printf("a: %d, b: %d\n", a, b);
}
void swap(int *c, int *d)
{
int t;
t = *c; *c = *d; *d = t;
}
OUTPUT
a: 20, b: 10
due to dereferencing by the pointer the value can be changed which is call by reference