answer.
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
docker41
2 months ago
9

Which of the following best describes how computing devices represent information? A. A computer will either represent informati

on as bits or bytes but not both B. A computer represents data as a byte which is either a 0 or a 1 C. A computer represents data as bits which is either a 0 or a 1 D. A computer represents information as bits which contain 8 bytes.
Computers and Technology
2 answers:
Rzqust [1K]2 months ago
8 0

Response:

c

Justification:

oksian1 [950]2 months ago
5 0

Answer:

The answer is B.

Explanation:

The justification for choosing B is that "bytes" represent the correct method for storing data in binary form of 0s and 1s.

You might be interested in
Strlen("seven"); what is the output?
oksian1 [950]

Response:

Your answer is A, and I hope this information is useful.

4 0
2 months ago
Write the definition of a function printAttitude, which has an int parameter and returns nothing. The function prints a message
Natasha_Volkova [1026]

Answer:

The C++ function definition for printAttitude can be seen below.

void printAttitude(int n)

{

switch(n)

{

case 1: cout<<"disagree"<<endl; break;

case 2: cout<<"no opinion"<<endl; break;

case 3: cout<<"agree"<<endl; break;

default: break;

}

}

Explanation:

It is notable that this method takes an int parameter.

Since it yields no value, it has a void return type.

The console displays messages based on the integer parameter, n, using a switch statement.

Output conditions are specified in different cases.

The default case takes care of values where no output is needed.

Each case concludes with a break statement to end the execution of the program.

This function can be utilized within a program as illustrated.

PROGRAM

#include <iostream>

using namespace std;

void printAttitude(int n)

{

switch(n)

{

case 1: cout<<"disagree"<<endl; break;

case 2: cout<<"no opinion"<<endl; break;

case 3: cout<<"agree"<<endl; break;

default: break;

}

}

int main() {

// variables to hold respective value

int n;

// user input taken for n

cout<<"Enter any number: ";

cin>>n;

// calling the function taking integer parameter

printAttitude(n);

return 0;

}

OUTPUT

Enter any number: 11

1. The user input is taken for the integer parameter.

2. Inside main(), the method, printAttitude(), is called with the user-input as a parameter.

3. If a user enters 11, which does not match any of the case values, the default case is executed, which does nothing and the break statement runs.

4. Thus, nothing is displayed for the input of 11.

5. When the user inputs 3, the corresponding case block is executed since it matches the case values.

6. The program produces the following output when the user inputs 3.

OUTPUT

Enter any number: 3

agree

The program concludes with a return statement.

4 0
1 month ago
Write a program using the standard library I/O functions (fopen, fread, fwrite, fclose, ferror, feof, and fflush) to read a text
amid [951]

Answer:

Refer to the explanation

Explanation:

#include <stdio.h>

#include <stdlib.h>

#include<string.h>

int main(int argc, char *argv[])

{

FILE *fr,*fr1,*fr3; /* declare the file pointer */

char filename[256];

char search[256];

char line[256];

int count=0;

char replace[256];

printf("Enter FileName: "); // ask for filename

scanf("%s",filename);

fr3 = fopen (filename, "r");

if(ferror(fr3)) //check for any error assosicated to file

{

fprintf(stderr, "Error in file"); // print error in stderr

printf("Error");

}

printf("Input file data is");

while(!feof(fr3)) // checking end of file condition

{ //printf("inside");

fgets(line,256,fr3);

printf("%s",line);

}

printf("\nEnter String to search: "); //ask for string to search

scanf("%s",search);

printf("Enter string with whom you want to replace: "); //ask for string with whom you want to replace one time

scanf("%s",replace);

fr = fopen (filename, "r"); // open first file in read mode

fr1 = fopen ("output.txt", "w"); //open second file in write mode

if(ferror(fr)) //check for any error assosicated to file

{

fprintf(stderr, "Error in file"); // print error in stderr

printf("Error");

}

while(!feof(fr)) // checking end of file condition

{ //printf("inside");

fgets(line,256,fr);

int r=stringCompare(line,search); // comparing every string and search string

// printf("%d",r);

if(r==1 && count==0)

{

fwrite(replace, 1, sizeof(replace), fr1 ); // writing string to file.

printf("%s\n",replace);

count++;

}

else{

printf("%s",line);

fwrite(line, 1, sizeof(line), fr1 );

}}

printf("\n");

fflush(fr1); // it will flush any unwanted string in stream buffer

fflush(fr);

fflush(fr3);

fclose(fr); //closing file after processing. It is important step

fclose(fr1);

fclose(fr3);

system("PAUSE");

return 0;

}

// Compare method which is comparing charaacter by character

int stringCompare(char str1[],char str2[]){

int i=0,flag=0;

while(str1[i]!='\0' && str2[i]!='\0'){

if(str1[i]!=str2[i]){

flag=1;

break;

}

i++;

}

if (flag==0 && (str1[i]=='\0' || str2[i]=='\0'))

return 1;

else

return 0;

}

7 0
1 month ago
What happened if the offshore team members are not able to participate in the iterations demo due to timezone/infrastructure iss
zubka84 [1067]

What if the offshore team members are unable to join the iterations demonstration because of timezone or infrastructure issues? (c) Not a significant problem. The offshore lead and the onsite team members will attend the demo with the product owner and can relay the feedback to the offshore team afterwards.

Explanation:

Not a significant problem. The offshore lead and the onsite team members will attend the demo with the product owner and can relay the feedback to the offshore team afterwards.

From the previous statement, it is evident that if offshore team members cannot attend the demo alongside the product owner due to issues with time zones or infrastructure, it won't pose a major concern because the onsite team will be present and can share all relevant insights and feedback with the offshore team. They all belong to the same team.

Therefore, the answer (3) is correct

4 0
3 months ago
Other questions:
  • The part of the computer that contains the brain, or central processing unit, is also known as the A.monitor B.modem C.keyboard
    10·1 answer
  • Write a for loop to print all NUM_VALS elements of array hourlyTemp. Separate elements with a comma and space. Ex: If hourlyTemp
    6·1 answer
  • What is the other name designated to a game master of multiplayer online games (MMOs)?
    11·2 answers
  • Which of the following is NOT true about data?
    8·2 answers
  • Huan wants to enter the science fair at his school. He has a list of ideas for his project. Which questions could be answered th
    14·1 answer
  • Write a Scheme predicate function that tests for the structural equality of two given lists. Two lists are structurally equal if
    13·1 answer
  • This assignment is based on Exercise 8.4 from your textbook. Each of the following Python functions is supposed to check whether
    11·1 answer
  • Stan’s assignment is to print a three-dimensional image on a piece of paper. Which printing technique should he use?
    14·2 answers
  • Of 500 sessions that occurred on a website during a one-week period, 200 of them started on the homepage; 100 of these 200 sessi
    10·1 answer
  • Austin works as a department head and frequently uses presentations to deliver information to his staff. He relies heavily on pr
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!