The answer to this is C :D
Answer:
Explanation:
a)use order by clause for sorting
for $x in doc("books.xml")/bib/book order by xs:float($x/price) return $x/title (default sorted in ascending order)
or
for $x in doc("books.xml")/bib/book order by xs:float($b/price) descending return $b/title (sorted in descending order)
b)doc("books.xml")//book[author = 'Abiteboul']
c)for $x in distinct-values(doc("bib.xml")/bib/book/author)
return <res>
<name>{$x}</name>
<count>
{count (doc("bib.xml")//book[exists(indexof(author,$x))]) }
</count>
<res>
Answer:
a=input("Amount in pennies")
b=int(a)
dollars=0
dimes= 0
quarters=0
nickels=0
pennies = 0
dollars = int(b/100)
b= b- dollars *100
quarters=int(b/25)
b=b-quarters*25
dimes = int(b/10)
b = b -dimes*10
nickels=int(b/5)
b=b - nickels * 5
pennies = b
print(dollars)
print(dimes)
print(nickels)
print(pennies)
Explanation:
The required program is in answer section. Note, the amount is entered in pennies.
Answer:
error: incompatible types
Explanation:
Given
The attached code
Required
The output
Variable "a" is declared as float
While p is declared as a pointer to an integer variable
An error of incompatible types will be returned on line 3, <em>int *p = a;</em>
Because the variables are not the same.
To assign a to p*, we have to use type casting.
Hence, (b) is correct