Answer:
when user wants duplicate copy of the object
Explanation:
Encapsulation are one of the key foundations of object-oriented programming (OOP). It involves the bundling of data or information with the methods and various techniques which operate on that data.
It can be used in hiding the true values or state of a structured data object that is in a class, preventing unauthorized parties' direct access to them.
The circumstances that can be allowed in returning a reference to the existing Engine is when user wants duplicate copy of the object.
Answer:
identifying yourself in a post or e-mail
writing short
respecting others privacy
Explanation:
Answer and Explanation:
In C programming language:
char fun(int*a, int*b){
printf("enter two integers: ");
scanf("%d%d",a,b);
int e;
printf("please enter a character: ");
e=getchar();
return e;
}
int main(int argc, char *argv[]) {
int d;
int f;
int g;
fun();
printf("%d%d%d", d, f, g);
}
We have declared a function fun type char above and called it in main. Note how he use the getchar function in c which reads the next available character(after the user inputs with printf()) and returns it as an integer. We then return the variable e holding the integer value as char fun() return value.
Answer:
See the below the answer written in Matlab
Explanation:
function inches=feetToInches(feet)
prompt='enter the value of feet in digits';
feet=input(prompt)% ask for the value in feet that needs to be converted to inches
inches =feet*12; % converts feet to inches
x=['the value in inches is: ',num2str(inches)];
disp(x) %display the result of the convertion
end