22. Following the declaration double ptr you must assign to ptr a. b. c. a varia
ID: 3586979 • Letter: 2
Question
22. Following the declaration double ptr you must assign to ptr a. b. c. a variable of type double. the address of a variable of a floating-point type. the address of a variable of type double. 23. Given the declarations void func(double pl, double p2): double x - 1.1,y -2.2 you can call the function funcO using a. func(x, y b. funcx, y) c. func(&x;, &y;) 24. In the equation x _ y % z, y and z are both int. Variable x is a double, y-34, and z- 6. What will be the value of the variable x? a. x = 4.0000000000 b, x = 5.0000000000 c, x = 5.6666666667 25. Which if statement would be true if you needed to see if x (an int) is greater than 26? a. if (x>0&&x;Explanation / Answer
answers:
22)c.the address of a variable of type double.
Explanations:
pointer holds the address of the variable.
The data type is double (double *ptr), it holds the address of the variable of data type double.
eg) double *ptr;
double x;
ptr = &x;
23)c. func(&x,&y);
Explantion:
address of the variable are passed to the functions. it access the address of the funcitons.
eg)
main(){
double x=1.1, y=2.2;
func(&x,&y); //address is passed
}
void func(double* p1,double* p2) //pointer points the address
{
}
24)a. x=4.000000000
Explanation:
x = y % z ;
since 34 % 6 = 4
and x is a double data type variable, prints as 4.00000000
25) d. if(x>26)
it checks whether varible x is greater than 26,
if it is greater than 26, it goes into the loop
26)b. ||
{> ,== , != } are relational operators. It defines the relation between two varibles
where || is a logical operator.
27)If the question is from c++
then the answer is a.True
ex:
string str("my string");
cout<<" The length of string is :" << str.size();
output:
The length of string is :9
//for any explantion , please do comments
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.