Answer:
hope this helps. I am also a learner like you. Please cross check my explanation.
Explanation:
#include
#include
using namespace std;
int main()
{
int a[ ] = {0, 0, 0}; //array declared initializing a0=0, a1=0, a3=0
int* p = &a[1]; //pointer p is initialized it will be holding the address of a1 which means when p will be called it will point to whatever is present at the address a1, right now it hold 0.
int* q = &a[0]; //pointer q is initialized it will be holding the address of a0 which means when q will be called it will point to whatever is present at the address a0, right now it hold 0.
q=p; // now q is also pointing towards what p is pointing both holds the same address that is &a[1]
*q=1
; //&a[0] gets overwritten and now pointer q has integer 1......i am not sure abut this one
p = a; //p is now holding address of complete array a
*p=1; // a gets overwritten and now pointer q has integer 1......i am not sure abut this one
int*& r = p; //not sure
int** s = &q; s is a double pointer means it has more capacity of storage than single pointer and is now holding address of q
r = *s + 1; //not sure
s= &r; //explained above
**s = 1; //explained above
return 0;
}
Answer:
me desculpe mais eu preciso de pontos para ajudr meu irmão autista
Answer:
true because then it would be like not popping out
Solution:
The process of transaction can guarantee the reliability of business applications. Locking resources is widely used in distributed transaction management (e.g; two phase commit, 2PC) to keep the system consistent. The locking mechanism, however, potentially results in various deadlocks. In service oriented architecture, the deadlock problem becomes even worse because multiple transactions try to lock shared resources in the unexpectable way due to the more randomicity of transaction requests, which has not been solved by existing research results. In this paper, we investigate how to prevent local deadlocks, caused by the resource competition among multiple sub-transactions of a gl obal transaction, and global deadlocks from the competition among different global transactions. We propose a replication based approach to avoid the local deadlocks, and a timestamp based approach to significantly mitigate the global deadlocks. A general algorithm is designed for both local and global deadlock prevention. The experimental results demonstrate the effectiveness and efficiency of our deadlock prevention approach. Further, it is also proved that our approach provides higher system performance than traditional resource allocation schemes.
This is the required answer.