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
hodyreva [135]
2 years ago
15

What is the function of a CPU? simple words:D

Computers and Technology
2 answers:
koban [17]2 years ago
4 0

Answer:

The brains of a computer

Alexxx [7]2 years ago
4 0

Answer:

A central processing unit (CPU), also called a central processor, main processor or just processor, is the electronic circuitry within a computer that executes instructions that make up a computer program.

Explanation:

You might be interested in
Write a new program called Lab7D that will read strings from a text file and turn them into "encrypted code". Create a bool func
Aliun [14]

Answer:

I am writing a C program for the first part and Python program for the second part of the question.    

<h2>1st program:</h2>

#include <stdio.h>  //to use input output functions

#include <stdlib.h>  // used here to access exit function

void main() {  //start of the main() function body

char fname[100], character;

// fname is the name of the input file which contains characters and character //variable is used to store characters

FILE *original, *temporary;  

/* two pointers of File type: original is used for the original input file and temporary is used for a temporary file name aux.txt */

printf("Enter the name of the text file to encrypt : ");

//prompts the user to enter the name of the file to be encrypted

scanf("%s",fname); //reads the name of the file from user

original=fopen(fname, "r"); //open the input file in read mode

if(original==NULL)  {

//displays the following message if the file is empty or does not exists

 printf("Cannot open original file");  

 exit(1);  }  //program exits

temporary=fopen("aux.txt", "w");

//creates a temporary file named aux.txt and open that file in write mode

if(temporary==NULL)  { //if temporary file could not be created

 printf("Cannot create a temporary file");

 fclose(original); //closes the original input file

 exit(2);  }  //program exits

while(1)  {

 character=fgetc(original);  

/*pointer original moves through the input file and gets input from original input file one character at a time and store it in character variable */

 if(character==EOF)  

//when all characters are obtained and pointer is at end of file  {

  break;  //the loop breaks }

 else   {  //if EOF is not yet reached

  character=character+100;  

//add 100 to each character to encrypt the characters

  fputc(character, temporary);

 // fputc() writes a single character at a time to aux file } }

fclose(original);  //closes input file

fclose(temporary); //closes aux file

original=fopen(fname, "w");  //opens input file in write mode

if(original==NULL) { //if file does not exist display following message

 printf("Cannot open the original file to write");

 exit(3);  } //program exits

temporary=fopen("aux.txt", "r"); //open aux.txt file in read mode

if(temporary==NULL)  { //if pointer temporary is NULL

 printf(" Cannot open temporary file to read");

 fclose(original);  //closes input file

 exit(4);  } //program exits

while(1)  {

 character=fgetc(temporary);

//obtains every character from aux file pointed by temporary

 if(character==EOF)  //if end of file is reaced {

  break;   } //the loop breaks

 else   { //if end of file is not reached

  fputc(character, original);  

//puts every character to input file }  }

printf(" %s is encrypted \n", fname);  

//displays this message when input file is successfully encrypted

//closes input and aux text files

fclose(original);

fclose(temporary); }  

Explanation:

The program first asks the user to enter the name of the file. Then the program uses two pointers original for input file and temporary for aux text file. It first opens the file whose name is entered by the user and reads that file by getting each single character using fgetc() until the pointer reaches the end of the file. While reading each character of the input file, it encrypts every character using and puts that encrypted content in temporary file names aux.txt using fputc() until the pointer reaches the end of the file. Lastly all the encrypted strings of the are placed in the original input text file.

<h2>Second program:</h2>

# bool function that accepts character as parameter and returns true if its a #vowel and false otherwise

def isVowel(character):  

   if character.lower() in 'aeiou':  #converts uppercase char to lowercase

       return True  #return true if character is a vowel    

   else:

       return False #returns false if input character is not a vowel

The program has a function isVowel() which takes a character as a parameter to check if that character is a vowel. If character is in uppercase  letters, it handles these characters using lower() method to convert the character to lowercase and then returns true if that character is a vowel otherwise returns false. To check the working of the function you can replace True and False with print statement such as:

if character.lower() in 'aeiou':

       print("It is a vowel")

   else:

       print("It is not a vowel")

And after that you can call this function and pass a character to it as:

isVowel('i')

5 0
3 years ago
Fill in the table below of the Interactive Word Wall. You are provided with the
kakasveta [241]

Answer:

that is so long i just want points

Explanation:

7 0
2 years ago
1)Which of the following statements about the print statement are TRUE? (Check all that apply)
balu736 [363]

Answer:

1) C

5) D

6) A

Explanation:

3 0
3 years ago
Variablesallow us to manipulate data through the ___________.
gladu [14]

Answer:

Reference

Explanation:

Variables provide reference to the stored data value.

For example:

int i = 0;

Here i is a variable of type int with an initial value of 0. i is a reference to this stored value 0. Now if I want to update the data, I can do so using this reference.

i = 1;

Now the reference is used to manipulate the stored data and change it to 1. In a similar manner all updates to the value can be done using the variable reference.

8 0
3 years ago
Este tipo de software sirve para controlar e interactuar con el sistema operativo, proporcionando control sobre el hardware y da
attashe74 [19]

Answer: c

Explanation:

4 0
2 years ago
Other questions:
  • An IT department submits a purchase order to buy a new computer from a vendor. "Purchase orders" are documents issued by buyers
    12·1 answer
  • The Windows Group Policy feature provides __________ that govern the way Windows operates in enterprise environments. a. a centr
    8·1 answer
  • Look at the four schematic symbols shown in the figure above. Each of the symbols is labeled with a number. Which of the followi
    5·2 answers
  • 3. You are a network administrator responsible for all network platforms and services. The Teta Company currently has only one b
    13·2 answers
  • Which one of the following is an example of hacktivism according to you and why?
    11·1 answer
  • We never need to use a forward declaration when invoking a public subprogram. true or false?
    15·1 answer
  • Which of the following is not part of active listening?
    6·2 answers
  • What is the output of the following code segment? int n = 0; for (int k = 0; k&lt; 2; k++) {n=n +2;} cout &lt;&lt; n; oo 0 1 O O
    8·1 answer
  • Unless grunkle stan pines is mistaken, there is a family of deer’s in his garden
    6·1 answer
  • 14. For the declaration, int a[4] = {1, 2, 3};, which one is right in the following description-
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!