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
scZoUnD [109]
3 years ago
15

This program will get you used to retrieving a value from a function. The function should be named getRandomNumber. The function

should return a single random integer from 1 to 100. From within main, you will declare an integer variable named rnd. Then you will assign a value into rnd from the getRandomNumber function. After you have done this, you will use a printf and show the random number that was returned. The prograrm should be named GetRandom--don't forget to rename main.c to GetRandom.c before turning in.
In this program you will create a function that returns PI. The function should be named getPI that returns a float. From within main, declare a float named myPI. Assign myPI from the getPI function. Then use printf to show the value that you got.
Computers and Technology
1 answer:
Sati [7]3 years ago
6 0
Adhdubsus. Wish sheets
You might be interested in
What is the difference, if any, between an alpha test group and a beta test group? An alpha test group is made up of people asso
Amanda [17]

Answer:

An alpha test group is made up of people associated with the project, but a beta test group is made up of people from outside the organization.

Explanation:

Based on the options you've presented, this one makes the most sense. Why? The Alpha Testing Phase of a project is those working with the earliest builds of the project. During this stage the project is bare bones, there's no meat.

By the time the Beta phase is reached, the team is ready to branch out of its inner circle and invite others to come help test it out. The Alpha stage they put the bones together and in the Beta stage their starting to put meat on it.

3 0
3 years ago
What is the cffa act
garri49 [273]

CFAA is an acronym that stands for Computer Fraud and Abuse Act. It is an anti-hacking bill that was passed to amend an existing computer fraud law. It aims to strengthen cyber security by forbidding access to computers without authorization.

3 0
2 years ago
Read 2 more answers
Very Short Answer Type Question (any 9)
Lubov Fominskaja [6]

Answer:

home page (also written as homepage) is the main web page of a website.

Ans 2

6 0
3 years ago
List five kinds of view in the computer and briefly define each​
mr Goodwill [35]

Answer:

It responds to a specific set of instructions in a well-defined manner. It can execute a prerecorded list of instructions (a program).

5 0
2 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:
  • What is an (CR) Optical character recognition?
    13·2 answers
  • 4. The same data source can be used multiple times in creating mail-merge documents.
    7·1 answer
  • When evaluating mining results, data mining and evaluating becomes
    6·1 answer
  • What important practice can help prevent hardware trouble?
    6·1 answer
  • What type of formula uses data from multiple worksheets
    6·1 answer
  • Select the correct answer.
    5·1 answer
  • In the computer science industry, the process of finding and removing errors from computer hardware or software is known as
    7·1 answer
  • Write a python program to change variable value of your previous result percentage to your current percentage of mid-term
    13·1 answer
  • True or false: if you are adding your own css sheet, make sure your css file comes before the bootstrap css file.
    7·1 answer
  • Data elements in a relational database are organized into ____
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!