1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Anni [7]
2 years ago
13

What is the benefits of using pointers​

Computers and Technology
1 answer:
Leno4ka [110]2 years ago
3 0

Answer:

One benefit of pointers is when you use them in function arguments, you don't need to copy large chunks of memory around, and you can also change the state by dereferencing the pointer. For example, you may have a huge struct MyStruct, and you have a function a ().

Explanation:

You might be interested in
If known vulnerabilities in software are entry points for an attacker, why are the software vulnerabilities not corrected before
Evgesh-ka [11]

Answer:

we dont knoqw

Explanation:

7 0
2 years ago
In what two ways can you reset your workspace in photoshop adobe 2020?
kati45 [8]

Answer:

right click 3 down press restart

Explanation:

7 0
3 years ago
Which of the following modes of replication requires a very low latency network connection and ensures data remains in synch wit
Sindrei [870]

Option B

Synchronous replication modes of replication requires a very low latency network connection and ensures data remains in synch with zero data loss in the event of a failure at the source site

<u>Explanation:</u>

Synchronous replication, information is replicated to a subsequent remote place at the identical period as fresh information is implying generated or renewed in the original datacenter.  Actually, both master and target roots endure effectively synchronized, which is vital for triumphant crash restoration.

In the circumstances of synchronous replication, this indicates that the write is deemed ended barely when both local and isolated warehouses approve its fulfillment. Therefore, nullity data failure is assured, but the overall execution is regulated down.

5 0
3 years ago
As you move through your professional career, you will receive requests for favors and contributions. You will not be able to ho
Alika [10]

Growing professionally comes with advises, comments (solicited and unsolicited), request for favours and also contributions. Moving up your professional career from the days of little beginning have always been accompanied with all of the requests and comments. As one levitates successfully, requests and contributions tend to increase. This can be scary and at the same time tiring as you go to question the sensibility of some of your decisions. While being inundated with these ’assistance', it is important that you carefully and thoroughly select the comments, contributions, requests of favours etc that is worth responding to. While some would be considered others will be discarded. Now, the question is how best can we politely turndown a person's request of favours and contributions without sounding rude, ungratetul and condescending. Both useful and irrelevant contributions deserve good responses. We could start by appreciating the request for favours and contributions, and tell whomsoever it may concern that you appreciate his/her assistance but unfortunately would not be needing them.

8 0
4 years ago
Implement the RC4 stream cipher in C++. User should be able to enter any key that is 5 bytes to 32 bytes long. Be sure to discar
gladu [14]

Answer:

Explanation:

#include <iostream>

#include <string>

#include<vector>

using namespace std;  

vector<int> permute(vector<int>, vector<int>);

string encrypt(vector<int>s1 , vector<int> t1, string p);

string decrypt(vector<int>s1, vector<int> t1, string p);

int main() {

  string plaintext = "cryptology";

  string plaintext2 = "RC4";

  vector<int> S(256);

  vector<int> T(256);

  int key[] = { 1,2,3,6 };

  int key2[] = { 5,7,8,9 };

  int tmp = 0;

  for (int i = 0; i < 256;i++) {

      S[i] = i;

      T[i] = key[( i % (sizeof(key)/sizeof(*key)) )];

  }

  S = permute(S, T);

  for (int i = 0; i < 256 ;i++) {

      cout << S[i] << " ";

      if ((i + 1) % 16 == 0)

          cout << endl;

  }

  cout << endl;

  string p = encrypt(S, T, plaintext);

  cout << "Message: " << plaintext << endl;

  cout << "Encrypted Message: " << " " << p << endl;

  cout << "Decrypted Message: " << decrypt(S, T, p) << endl << endl;

  tmp = 0;

  for (int i = 0; i < 256;i++) {

      S[i] = i;

      T[i] = key2[(i % (sizeof(key) / sizeof(*key)))];

  }

  S = permute(S, T);

  for (int i = 0; i < 256;i++) {

      cout << S[i] << " ";

      if ((i + 1) % 16 == 0)

          cout << endl;

  }  

  cout << endl;

  p = encrypt(S, T, plaintext2);

  cout << "Message: " << plaintext2 << endl;

  cout << "Encrypted Msg: " << p << endl;

  cout << "Decrypted Msg: "<<decrypt(S, T, p) << endl << endl;

  return 0;

}

string decrypt(vector<int>s1, vector<int> t1, string p) {

  int i = 0;

  int j = 0;

  int tmp = 0;

  int k = 0;

  int b;

  int c;

  int * plain = new int[p.length()];

  string plainT;

  for (int r = 0; r < p.length(); r++) {

      i = (i + 1) % 256;

      j = (j + s1[i]) % 256;

      b = s1[i];

      s1[i] = s1[j];

      s1[j] = b;

      tmp = (s1[i] + s1[j]) % 256;

      k = s1[tmp];

      c = ((int)p[r] ^ k);

      plain[r] = c;

      plainT += (char)plain[r];

  }

  return plainT;

}  

string encrypt(vector<int>s1, vector<int> t1, string p) {

  int i = 0;

  int j = 0;

  int tmp = 0;

  int k = 0;

  int b;

  int c;

  int * cipher = new int [p.length()];

  string cipherT;

  cout << "Keys Generated for plaintext: ";

  for (int r = 0; r < p.length(); r++) {

      i = (i + 1) % 256;

      j = (j + s1[i]) % 256;

      b = s1[i];

      s1[i] = s1[j];

      s1[j] = b;

      tmp = (s1[i] + s1[j]) % 256;

      k = s1[tmp];

      cout << k << " ";

      c = ((int)p[r] ^ k);

      cipher[r] = c;  

      cipherT += (char)cipher[r];

  }

  cout << endl;

  return cipherT;

}

vector<int> permute(vector<int> s1, vector<int> t1) {

  int j = 0;

  int tmp;

  for (int i = 0; i< 256; i++) {

      j = (j + s1[i] + t1[i]) % 256;

      tmp = s1[i];

      s1[i] = s1[j];

      s1[j] = tmp;

  }

  return s1;

}

6 0
3 years ago
Other questions:
  • Which mitigation technique would prevent rogue servers from providing false ip configuration parameters to clients?
    5·2 answers
  • Before his job interview, Shabnam took the time to carefully wash and iron his best khaki pants and a button-down shirt. He even
    15·2 answers
  • What year did Elvis die? Right answer 1977.
    14·1 answer
  • A manufacturing company inspects all products before selling them. Less than 1% are defective and do not pass inspection. You ar
    9·1 answer
  • 2x + 3y = 11<br>y = x-3​
    8·2 answers
  • What are the five Ws?<br> (I don’t even know what this means)
    5·2 answers
  • From the philosophical standpoint, especially in the discussion of moral philosophy or ethics, why do we consider “murder” or “k
    9·1 answer
  • SummaryIn this lab, you complete a partially prewritten Java program that uses an array.The program prompts the user to interact
    12·1 answer
  • Choose the correct color to complete the sentence.
    15·1 answer
  • If you are inviting more than one person to a meeting, you can use a(n) _____ to separate the email addresses.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!