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
s2008m [1.1K]
3 years ago
6

In the following code snippet, what are the local variables of the function modByTwo?

Computers and Technology
1 answer:
kvasek [131]3 years ago
6 0
Result is the local variable because it can only be accessed and determined by the main functions which are addFive and modByTwo. A local variable is a variable that can only be accessed by its scope. Remember to like if this helped
You might be interested in
What is working with others to find a mutually agreeable outcome?
aleksley [76]
Verbal communication im pretty sure
6 0
3 years ago
Read 2 more answers
What is the possible output from system.out.println((int)math.random() * 4)?
antiseptic1488 [7]
<span>int randomWithRange(int min, int max) {
    int range = (max - min) + 1;
    return (int)(Math.random() * range);
}</span>

Output of randomWithRange(2, 5) 5 times:

3 0 1 1 0

6 0
3 years ago
A(n) _____ is a computer network that uses Internet Protocol technology to share information, operational systems, or computing
belka [17]

Answer:

The answer is A - INTRANET.

Explanation:

Option B is not the correct answer. An intercom is a stand-alone voice communications system for use within a building or small collection of buildings, functioning independently of the public telephone network. Intercoms are generally mounted permanently in buildings and vehicles

Option C is not the correct answer. In telecommunication, a transponder is a device that, upon receiving a signal, emits a different signal in response.

Option A is the correct answer. An intranet is a computer network for sharing corporate information, collaboration tools, operational systems, and other computing services only within an organization.

3 0
3 years ago
HTTP is the protocol that governs communications between web servers and web clients (i.e. browsers). Part of the protocol inclu
frutty [35]

Answer:

A switch statement is a set of different outputs depending on the number of criteria asked to follow.

Given an integer number as a variable status, the algorithm would state as the following:

       int num

       switch (num) {

           case 200:

               printf(OK);

               break;

           case 403:

               printf(Fobidden);

               break;

           case 404:

               printf(Not Found);

               break;

           case 500:

               printf(Server Error);

               break;

           default:

               printf(Not a proper value);

               break;

       }

Depends on the value of hte variable "num", it will fall in one of the options above. If the variable has a different value that doesn't fit in any of the options above, it will prompt the default message.

4 0
3 years ago
Write a C program (doublecopy) that allows a user to extract some part of an existing file (fileSource) and copy it twice to a n
Slav-nsk [51]

Answer:

Check the explanation

Explanation:

#include <stdio.h>

#include <sys/stat.h>

#include <stdlib.h>

#include <fcntl.h>

#include <errno.h>

#include <unistd.h>

extern int errno;

struct stat st;

int main(int argc, char **argv){

  int num1 = atoi(argv[1]); // Getting num1 from user

  int num2 = atoi(argv[2]); // Getting num2 from user

  char *fileSource = argv[3];

  char *fileTarget = argv[4];

 

  int source_fd = open(fileSource, O_RDONLY); // opening the file in read only mode

  int target_fd = open(fileTarget, O_WRONLY | O_CREAT); // opening the target file in Writeonly mode if file is not found it will create

   

  char *ch = (char *) calloc(num2+num1, sizeof(char));

 

  stat(fileSource, &st);

  if(st.st_size < (num1 + num2)){

      printf("File Size is smaller than the specified bytes\n");

      read(source_fd, ch, st.st_size); // reading the file upto the end

      write(target_fd, ch, st.st_size); // write to the file

      write(target_fd, ch, st.st_size); // two times writing to the file

  }else{

      if(lseek(source_fd, (off_t)num1, SEEK_SET) < 0 ) // moving the cursor to after the specified bytes from the start

      {

          printf("Some Error occured while seeking the file");

          return -1;

      }

      read(source_fd, ch, num2); // reading num2 bytes from the source

      write(target_fd, ch, num2); // writing two times to the target

      write(target_fd, ch, num2);

     

  }

 

  return 0;

 

}

1 2 #include <stdio.h> #include <sys/stat.h> #include <stdlib.h> #include <fcntl.h> #include <errno.h> #include <unistd.h> 4

The code screenshot and code output are attached below.

3 0
3 years ago
Other questions:
  • The process of converting information, such as text, numbers, photos, or music, into digital data that can be manipulated by ele
    7·1 answer
  • You are going to buy a computer but first you want to do some research to help you select the best model everfi answer
    11·1 answer
  • What is intellectual property?
    7·1 answer
  • The activities that gather information about the organization and its network activities and assets is called fingerprinting. __
    14·1 answer
  • Instructions:Select the correct answer.
    6·2 answers
  • You can run a macro by:
    10·1 answer
  • An ordinary office environment needs computers that have multiple user account settings where each user is allocated private dat
    13·1 answer
  • What are Manuscript signs​
    8·1 answer
  • Robyn needs to ensure that a command she frequently uses is added to the Quick Access toolbar. This command is
    14·1 answer
  • . Is it conceivable to design a secure operating system for these computer systems? Give arguments for and against.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!