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
vaieri [72.5K]
3 years ago
10

Write a function that takes a character string value and prints out the bytes stored in memory of its representation (including

the terminating 0). Test it on a string containing your full name.
Computers and Technology
1 answer:
Goryan [66]3 years ago
6 0

Answer:

C++ code explained below

Explanation:

SOURCE CODE:

*Please follow the comments to better understand the code.

#include <stdio.h>

int numOfBytes(char* string)

{

// initialise the variables

int i=0,size=0;

// while the string reaches to \0, repeat the loop.

while(string[i]!='\0')

{

// add that size

size += sizeof(*string);

 

// increase the i value.

i++;

}

// add 1 byte for \0

size = size+1;

return size;

}

int main() {

char name[]="Praveen Kumar Reddy";

printf("The size is %d bytes.",numOfBytes(name));

 

  return 0;

}

=============

You might be interested in
What is the purpose of extent in lines in engineering drawing
Blizzard [7]

Answer:

Extension lines are used to indicate the extension of a surface or point to a location preferably outside the part outline.

Explanation:

7 0
2 years ago
A personal business letter is a letter that is ____.
Simora [160]

Answer:

Explanation:

One group of students did an experiment to study the movement of ocean water. The steps of the experiment are listed below.

Fill a rectangular baking glass dish with water.

Place a plastic bag with ice in the water near the left edge of the dish.

Place a lighted lamp near the left edge of the dish so that its light falls directly on the plastic bag.

Put a few drops of ink in the water.

The student did not observe any circulation of ink in the water as expected because the experiment had a flaw. Which of these statements best describes the flaw in the experiment? (2 points)

Not enough ink was added.

Not enough water was taken.

The dish was too small for the experiment.

The lamp and the ice bag were at the same place.

8 0
3 years ago
A small business has suffered from a cyber attack, what could be the resultant damage​
frutty [35]

Answer:

Cyber Attacks can damage small or big business. Different kinds of attacks will lead to the different losses. some of the most common attacks are

  • DOS Attack
  • Bruteforce Attack
  • DDOS Attack
  • XSS Attack
  • API Attack
  • Network Attacks
  • Identity and Token theft attack
  • Man in the middle attacks
  • Application Level Attacks

Each attack can impact different domain and different level of damages. The biggest damage can be loss of reputation and monetorial losses. It can eventually invite law suites and can make company go bankrupt.

Explanation:

Following damages can be seen with cyber attacks.

<u><em>Loss of Reputation : </em></u>Loss of reputation is the worst damage that any cyber attack can create. This will  result in the business losses and also result in irreversible damage to existing customer base and also it will spoil the market value.

<u><em>Loss of Corporate Information:</em></u> Attackers can use the corporate information which can consist of customers data, unwanted lawsuits and also company’s employees details. Data recovery may not be possible once the attacker has full corporate access.

<u><em>Loss of Identity: </em></u>Once the personal information is lost then Hackers can use personal information for impersonation, and identity theft. Identity theft is more dangerous as it is used for illegal activities.

Cyber-attacks can disrupt your business activities and it will include as below

<u><em>Loss of Data : </em></u> Successful cyber attack can damage the data and even can corrupt the data which will be of no use.

<u><em>Loss of Infrastructure :</em></u> Servers, computers, databases can be disrupted with a cyber-attack which can be irreversible and even be more disastrous as physical infrastructure is impacted.

<u><em>Extortion losses :</em></u> Attackers can threaten to disclose sensitive data and can intern ask for ransom payment.

<u><em>Lawsuits : </em></u>If the customer’s data is exposed or used for illegal business then it will invite huge lawsuits.

<u><em>Notification Policy :</em></u> If data is breached then it is also important to notify the effected users and the next remedy taken to resolve it.

<u><em>Loss of Business :</em></u> Cyber attacks can create business losses and also will eventually affect existing and new customers.

4 0
3 years ago
If you have machines doing jobs, fewer staff are needed, therefore costs are
elena55 [62]
If you have machines doing jobs, fewer staff is needed, therefore the costs are LESS.

Hope I helped!
4 0
3 years ago
Read 2 more answers
Ryan wants to ensure that all the words in this document are evenly spaced so that they look neat and readable . Which option in
natka813 [3]
To achieved a document that is evenly spaced so that they look neat and readable, the option in a word processing program will help to achieve this is the home setting. In the home of the word, you can see there various tabs, one of the tabs is the paragraph. You will click symbol of "justify". And there is simple code to do that, just press the "Ctrl" and "J" on your keyboard at the same time.
5 0
3 years ago
Other questions:
  • Which of the following is the best definition of a workplace policy?
    13·2 answers
  • 2. Statement: "I don't agree with you." Nonverbal gesture: Type of gesture:
    6·1 answer
  • Write a C function which mimics the behavior of the assembly language function below. Note that this time, the assembly language
    10·1 answer
  • Which of the following is a name for the place an information services and support professional might work? software development
    15·2 answers
  • How to change color of object in photoshop?
    10·2 answers
  • NEED HELP ASAP!!!!!!
    7·2 answers
  • Ethan wants to change the font in his document. He should _____.
    8·1 answer
  • Write a user input program that simulates a game of a rolling pair of dice. You can create/simulate rolling one die by choosing
    10·1 answer
  • Write steps for converting decimal to binary numbers?
    13·1 answer
  • Explain why you would use the soft on/off jumper when working on ATX system
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!