Function Calls Using Value and Reference Parameter Examples: Void function call using value parameters (can use expression, constant, or variable)
What is void function in C programming?
Except that they do not return a value when the function executes, void functions are constructed and used just like value-returning functions. The term "void" is used by void functions in place of a data type. A void function does a job before returning control to the caller; nevertheless, it does not return a value.Statements that are void functions are independent. When the function return type in computer programming is void, it means the function doesn't return a value. The word void indicates that a pointer is universal when it appears in a pointer declaration.A function called void *function() in the C programming language returns a value that, when dereferenced, is of the type void.Learn more about void function refer to :
https://brainly.com/question/25644365
#SPJ4
Who likes virtual if you do what do you like about ot
Answer:
Explanation:
I do not like virtual because I like to go outside.
List 10 examples of input devices categorise into the 3 major types of input hardware. 1. Pointing device 2. Source data input 3 keyboard
10 examples of input devices categorise into the 3 major types of input hardware.
1. Pointing Devices:
a. Mouse
b. Trackball
c. Joystick
2. Source Data Input:
a. Barcode Scanner
b. Magnetic Stripe Reader
c. Optical Character Reader
3. Keyboard:
a. Standard Keyboard
b. Numeric Keyboard
c. Ergonomic Keyboard
What is Barcode Scanner?Barcode Scanner is a type of technology that is used to read barcodes. Barcodes are a series of vertical lines and spaces of varying widths, which can be scanned by a barcode scanner and converted into digital data. This data can then be used to track a product, identify it, and store information about it. Barcode scanners are used in a variety of industries, such as retail, healthcare, and manufacturing, to increase accuracy and efficiency.
To know more about Barcode scanner
brainly.com/question/14399922
#SPJ1
what is the percentage of 20?
Hi!
I'm Happy to help you today!
The answer to this would be 20%!
The reason why is because percents are simple to make! Like theres always an end percent! But its always gonna end at 100% Let me show you some examples to help you understand!
So were gonna have the end percent at 100%
Lets turn 2 into a percent!
2 = 2% because its under 100%
Now lets go into a Higher number like 1000%
So lets turn 33 into a percent!
33 = 3.3% 30 turns into 3% because of the max percent of 1000% and then 3 turns into .3% because of the max of 1000%
I hope this helps!
-LimitedLegxnd
-If you enjoyed my answer make sure to hit that Heart! Also Rate me to show others how well i did! You can do that by clicking the stars!
-Question asker mark me brainliest if you really enjoyed my answer!
Select the correct locations on the image. Adrian wants to delve into database administration. Which certifications would help him along this career path? PMP Oracle DBA PRINCE2 CSPM MCITP
you can pick multiple
Answer:
Oracle DBA and MCITP
Rita is designing a digital card on her cellphone for her mother's birthday. She wants to crop out certain portions of her mother’s photograph to use on the card. Which of these apps can she use to do this?
Describe how to manage the workspace by putting each feature under the action it helps carry out
Answer:
Viewing Documents one at a time:Windows+tab keys,
Windows taskbar
Viewing documents at same time:
Snap,Arrange all
Explanation:
The workspace can be managed by putting control of the surroundings it's far important that you examine all of the factors and items found in your area.
What is the workplace for?Workspaces had been round in Ubuntu properly earlier than the transfer to Unity. They essentially offer you a manner to organization home windows associated with comparable duties together, in addition to get "additional" screenspace.
The subsequent step is to outline a logical and optimizing feature for the factors with a view to continuing to be on your surroundings, defining that each of them may be capable of carrying out an easy and applicable project for his or her paintings.
Read more about the workspace :
https://brainly.com/question/26463698
#SPJ2
Write a method that finds the cheapest name of apples, and returns back a String stating what the apple name is and how much it costs. The method should take two arrays as two parameters (you do not need to make a two dimensional array out of these arrays).
The question is incomplete! Complete question along with answer and step by step explanation is provided below.
Question:
Two arrays are given:
String apples[] = {"HoneyCrisp", "DeliciousRed", "Gala", "McIntosh", "GrannySmith"};
double prices[] = {4.50, 3.10, 2.45, 1.50, 1.20};
Write a method that finds the cheapest name of apples, and returns back a String stating what the apple name is and how much it costs. The method should take two arrays as two parameters (you do not need to make a two dimensional array out of these arrays).
Answer:
The complete java code along with the output is prrovided below.
Java Code:
public class ApplesCheap
{
public static String Cheapest(String apples[], double prices[])
{
int temp = 0;
for (int i = 0; i < apples.length; i++)
{
if (prices[i] < prices[temp])
{
temp = i;
}
}
return apples[temp];
}
public static void main(String[] args)
{
// define the array of apple names and their prices
String apples[] = {"HoneyCrisp", "DeliciousRed", "Gala", "McIntosh", "GrannySmith"};
double prices[] = {4.50, 3.10, 2.45, 1.50, 1.20};
// print the cheapest apple by calling the function Cheapest
System.out.println("The cheapest apple is: " + Cheapest(apples, prices));
}
}
Output:
The cheapest apple is: GrannySmith
How can i write a java program to display the multiplication table for the number entered by the user and the values doesn’t exceed 100 .For example if the user enter 3 the output should be like this :
3
6
9
12
15
18
21
24
27
30
33
36
39
42
45
48
51
54
57
60
63
66
69
72
75
78
81
84
87
90
93
96
99
Answer:
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("Enter an integer");
int num = input.nextInt();
int i=1;
while( i*num < 100) {
System.out.println(i*num);
i++;
}
input.close();
}
}
Explanation:
If you want the value 100 to be included, change the < to <=.
4. The hard drive is a long-term storage, which means the data is still saved even if you turn the computer off or unplug it. True False
Answer:
True
Explanation:
A hard drive doesn´t wipe itself after a certain amount of time like RAM does. The data you store on it will stay there until the hard drive is either destroyed, or you delete to the data yourself.
_____ selectors are used to select elements based on elements that are adjacent to them in the document hierarchy.
Answer:
Sibling
Explanation:
Sibling elements that share the same parents are adjacent to each other The basics are one level higher The last item on the childless hierarchy is decent. The child is the immediate next itemso correct answer is siblingThe instructions for the OS provided by application software are known as _____.
interfaces
GUIs
system calls
RAMs
hope this helps out with anything it can
Fill in the blanks to complete the “endangered_animals” function. This function accepts a dictionary containing a list of endangered animals (keys) and their remaining population (values). For each key in the given “animal_dict” dictionary, format a string to print the name of the animal, with one animal name per line.
def endangered_animals(animal_dict):
result = ""
# Complete the for loop to iterate through the key and value items
# in the dictionary.
for ___
# Use a string method to format the required string.
result += ___
return result
print(endangered_animals({"Javan Rhinoceros":60, "Vaquita":10, "Mountain Gorilla":200, "Tiger":500}))
# Should print:
# Javan Rhinoceros
# Vaquita
# Mountain Gorilla
# Tiger
Answer:
def endangered_animals(animal_dict):
result = ""
for animal, population in animal_dict.items():
result += f"{animal}\n"
return result
print(endangered_animals({"Javan Rhinoceros":60, "Vaquita":10, "Mountain Gorilla":200, "Tiger":500}))
Explanation:
The endangered_animals function accepts a dictionary containing a list of endangered animals (keys) and their remaining population (values). It uses a for loop to iterate through the dictionary items and format a string containing the name of each animal with a newline character at the end. Finally, the function returns the resulting string.
When this function is called with the example dictionary {"Javan Rhinoceros":60, "Vaquita":10, "Mountain Gorilla":200, "Tiger":500}, it prints the following output:
Javan Rhinoceros
Vaquita
Mountain Gorilla
Tiger
def endangered_animals(animal_dict):
result = ""
for animal, population in animal_dict.items():
result += f"{animal}\n"
return result
print(endangered_animals({"Javan Rhinoceros":60, "Vaquita":10, "Mountain Gorilla":200, "Tiger":500}))
What endangered_animals function accepts?The endangered_animals function accepts a dictionary containing a list of endangered animals (keys) and their remaining population (values). It uses a for loop to iterate through the dictionary items and format a string containing the name of each animal with a newline character at the end. Finally, the function returns the resulting string.
When this function is called with the example dictionary {"Javan Rhinoceros":60, "Vaquita":10, "Mountain Gorilla":200, "Tiger":500}, it prints the following output:
Javan Rhinoceros
Vaquita
Mountain Gorilla
Tiger
Therefore, print(endangered_animals({"Javan Rhinoceros":60, "Vaquita":10, "Mountain Gorilla":200, "Tiger":500}))
Learn more about programming on:
https://brainly.com/question/11023419
#SPJ2
Creating Classes
Create a class that will keep track of a yes/no survey. You will have to store the text (question) of the survey plus the number of yes/no votes. The constructor requires a description of the survey to be passed int (the question). The vote method will simply increment the correct vote count. The toString method will format all of the instance data to be displayed on the screen
Answer:
Explanation:
The following code was written in Java. The class created is called Survey. In the constructor it takes in the question in order to create the survey object. The vote method, asks the user for a yes/no response and saves it. Finally, the toString method prints the question and the number of each vote to the screen. Due to technical difficulties I have added the code as a txt file attached below.
The nth Fibonacci number Fn is defined as follows: F0 = 1, F1 = 1 and Fn = Fn−1 + Fn−2 for n > 1.
In other words, each number is the sum of the two previous numbers in the sequence. Thus the first several Fibonacci numbers are 1, 1, 2, 3, 5, and 8. Interestingly, certain population growth rates are characterized by the Fibonacci numbers. If a population has no deaths, then the series gives the size of the poulation after each time period.
Assume that a population of green crud grows at a rate described by the Fibonacci numbers and has a time period of 5 days. Hence, if a green crud population starts out as 10 pounds of crud, then after 5 days, there is still 10 pounds of crud; in 10 days, there is 20 pounds of crud; in 15 days, 30 pounds of crud; in 20 days, 50 pounds of crud, and so on.
Write a program that takes both the initial size of a green crud population (in pounds) and some number of days as input from the keyboard, and computes from that information the size of the population (in pounds) after the specified number of days. Assume that the population size is the same for four days and then increases every fifth day. The program must allow the user to repeat this calculation as long as desired.
Please note that zero is a valid number of days for the crud to grow in which case it would remain at its initial value.
You should make good use of functions to make your code easy to read. Please use at least one user-defined function (besides the clearKeyboardBuffer function) to write your program.
basically I've done all the steps required except the equation in how to get the final population after a certain period of time (days). if someone would help me with this, I'll really appreciate it.
In Python, it can be expressed as follows. Using the recursive function type, we find the sum of the previous term and the sum of the two previous terms.
Python:x=int(input("Initial size: "))
y=int(input("Enter days: "))
mod=int(y/5)-1
def calc(n):
gen_term = [x,2*x]
for i in range(2, n+1):
gen_term.append(gen_term[i-1] + gen_term[i-2])
return gen_term[n]
if(mod==0):
print("After",y,"days, the population is",x)
else:
print("After",y,"days, the population is",calc(mod))
Our goal is to develop a very simple English grammar checker in the form of a boolean function, isGrammatical(wordList). To begin, we will define a sentence to be grammatical if it contains three words of form: determiner noun verb. Thus
[“the”, “sheep”, “run”] is grammatical but [“run”, “the”, “sheep”] is not grammatical nor is
[“sheep”, “run”]. By tagging convention, determiners are tagged as DT, nouns as NN, verbs as VB, and adjectives (which we discuss later) as JJ. The tagSentence function from the tagger module will help you convert your wordlist to tags; a challenge is that some words (such as swing) have multiple definitions and thus multiple parts of speech (as swing is a noun and swing is a verb). Carefully examine the results returned by tagSentence when defining the logic of isGrammatical.
Note that by our current definition, we are not concerned with other aspects of grammar such as agreement of word forms, thus “an sheep run” would be considered as grammatical for now. (We will revisit this concern later.)
[3 points]
Add the words “thief”, “crisis”, “foot”, and “calf” to the lexicon.txt file, and modify wordforms.py so that it generates their plural forms correctly (“thieves”, “crises”, “feet”, “calves”). In terms of categories for the lexicon.txt, thief is a person, crisis and feet are inanimates. Interestingly, ‘calf’ might be an animal (the young cow) but might be an inanimate (the part of the body).
We are not yet using plurals in our sentences, but you should be able to add additional tests within the wordforms.py file to validate that these new words and forms are handled properly.
[3 points]
The original lexicon includes singular nouns such as cat but not plural forms of those nouns such as cats, and thus a sentence such as “the cats run” is not yet deemed as grammatical. However, the wordforms module does include functionality for taking a singular noun and constructing its plural form.
Modify the code in tagger.py so that it recognizes plural forms of nouns and tags them with NNS. We recommend the following approach:
update the loadLexicon function as follows. Every time you encounter a word that is a noun from the original lexicon.txt file, in addition to appending the usual (word,label), add an extra entry that includes the plural form of that noun, as well as a label that adds an ‘s’ to the original label. For example, when encountering ‘cat’ you should not only add (‘cat’,’animal’) to the lexicon but also (‘cats’,’animals’).
Then update the the labelToTag function to return the new tag NNS when encountering one of those plural labels such as ‘animals’.
Test your new functionality on sentences such as “the cats run” as well as with your new plurals such as “thieves”.
[2 points]
The original lexicon includes verbs such as run but not 3rd person singular forms of those verbs that end in -s such as runs, and thus a sentence such as “the cat runs” is not yet deemed as grammatical. As you did with nouns in the previous step, modify the software so that 3rd person singular verbs are added to the lexicon and tagged as VBZ. Test this new functionality on sentences such as “the cat runs” and
“the sheep runs”.
[2 points]
Now we have both plural nouns and 3rd person singular verbs, however the grammar checker currently doesn’t match them and thus accepts sentences like
“the cat run” and “the cats runs”, neither of which is truly grammatical. Update the rules so that it requires the tag VBZ on the verb if the noun has the singular tag NN, and requires the tag VB on the verb if the noun has the plural tag NNS. Add some test cases to ensure the program is working as intended. Include tests with unusual forms such as the noun “sheep” that can be singular or plural; thus “the sheep runs” and “the sheep run” are grammatical. Make sure to update any previous tests to conform to these new expectations.
[2 points]
Update your grammar to allow any number of optional adjectives between the determiner and noun in a sentence, thereby allowing sentences such as
“the big sheep run” and “the big white sheep run”, though disallowing sentences such as “the cat sheep run”.
Using the knowledge in computational language in python it is possible to write a code that form of a boolean function, isGrammatical(wordList). To begin, we will define a sentence to be grammatical if it contains three words of form: determiner noun verb.
Writting the code:# importing the library
import language_tool_python
# creating the tool
my_tool = language_tool_python.LanguageTool('en-US')
# given text
my_text = 'A quick broun fox jumpps over a a little lazy dog.'
# correction
correct_text = my_tool.correct(my_text)
# printing some texts
print("Original Text:", my_text)
print("Text after correction:", correct_text)
See more about python at brainly.com/question/18502436
#SPJ1
20 Points! What are some ways to insert a row or column? Check all that apply.
double-clicking on the row or column and clicking Insert Row or Insert Column
right-clicking on the row or column heading and clicking Insert
opening the Page Layout tab, clicking Cells in the Tables group, and clicking Rows or Columns
opening the Home tab, clicking Insert in the Cells group, and clicking Insert Sheet Rows or Insert Sheet Columns
Answer:
B) right-clicking on the row or column heading and clicking Insert
D) opening the Home tab, clicking Insert in the Cells group, and clicking Insert Sheet Rows or Insert Sheet Columns
Explanation:
Answer:
b and d
Explanation:
if the bandwidth-delay product of a channel is 500 Mbps and 1 bit takes 25 milliseconds to make the roundtrip, what is the bandwidth-delay product
Answer:
2500 kb
Explanation:
Here, we are to calculate the bandwidth delay product
From the question, we are given that
band width = 500 Mbps
The bandwidth-delay product is = 500 x 10^6 x 25 x 10^-3
= 2500 Kbits
what is this car first to awnser is the brianliest
Answer: Lamborghini
Explanation: Is it yours
Why is it important to use correct syntax?
ANSWER: D) to ensure the programs run properly and return expected results
Answer: True
Explanation:
Answer:
D
Explanation:
If your options are
a) to demonstrate a sophisticated programming style
b) to demonstrate a flexible programming style
c)to ensure that programs will work on any computer platform
d) to ensure that programs run properly and return expected results
Then yes this is very much correct!
IoT is an interaction between the physical and the digital world ? True or False
Answer:
The given statement is true.
Explanation:
IoT stands for internet-of-things. When we talk about internet of things, we are talking about the physical devices and the software that is used. IoT can simply be defined as a connection between physical and digital world.
The physical world consists of sensors, actuators etc
While the digital consists of the algorithms and programs.
Hence,
The given statement is true.
Which new development in malware caused sandbox technology to automate and introduce artificial intelligence learning
AI-driven attacks caused sandbox technology to automate and introduce artificial intelligence learning. AI and machine learning can be used to fight against malware attacks.
Artificial intelligence, machine learning, and malwareArtificial intelligence (AI) refers to the ability of a PC to perform tasks done by humans due to the requirement of discernment.
Machine learning is a subdivision of (AI) based on the use of data and algorithms to mimic human learning.
Malware is malicious software generated by cybercriminals, which are capable of stealing unauthorized information.
Learn more about malware here:
https://brainly.com/question/399317
Which of the following is NOT one of the four benefits of using email?
Answer:
Can you give choices.
Explanation:
The Earth receives different amounts of energy from the Sun in each hemisphere because
Answer:
The correct answer is option C. "its axis is tilted".
Explanation:
The axis of the Earth is tilted at an angle of 23.5 degrees away from vertical, perpendicular to the plane. This tilt results in the Earth receiving different amounts of energy from the Sun in each hemisphere and having its characteristic seasons. This phenomena is explained by how the Earth responds to its axis being tilted, which is by traveling in a loop around the Sun each year.
write a c program to insert and delete values from stack( to perform pop and push operations) using an array data structure
Answer:
How to implement a stack in C using an array?
A stack is a linear data structure that follows the Last in, First out principle (i.e. the last added elements are removed first).
This abstract data type can be implemented in C in multiple ways. One such way is by using an array.
Pro of using an array:
No extra memory required to store the pointers.
Con of using an array:
The size of the stack is pre-set so it cannot increase or decrease.
what are the benefits and drawbacks of a desktop utilising virtualisation and a server?
•Cons of Virtualization. High Initial Investment. Data Can be at Risk. Quick Scalability is a Challenge. Performance Witnesses a Dip.
•Pros of Virtualization. Uses Hardware Efficiently. Available at all Times. Recovery is Easy. Quick and Easy Setup. Cloud Migration is Easier.
Mark as brainlest answer!!!!!This is the area that displays icons representing open applications.
My Documents
Start menu
system tray
taskbar
Answer:
Start menu is the correct answer
If you had to make a choice between studies and games during a holiday, you would use the _______ control structure. If you had to fill in your name and address on ten assignment books, you would use the ______ control structure.
The answers for the blanks are Selection and looping. Saw that this hasn't been answered before and so just wanted to share.
The missing words are "if-else" and "looping".
What is the completed sentence?If you had to make a choice between studies and games during a holiday, you would use the if-else control structure. If you had to fill in your name and address on ten assignment books, you would use the looping control structure.
A loop is a set of instructions in computer programming that is repeatedly repeated until a given condition is met. Typically, a process is performed, such as retrieving and modifying data, and then a condition is verified, such as whether a counter has reached a predetermined number.
Learn more about looping:
https://brainly.com/question/30706582
#SPJ1
In order to average together values that match two different conditions in different ranges, an excel user should use the ____ function.
Answer: Excel Average functions
Explanation: it gets the work done.
Answer:
excel average
Explanation:
Declare an array to store objects of the class defined by the UML. Use a method from the JOptionPane class to request the length of the array from the user.
Answer:
it's a test ?
The showInputDialog method is a part of the JOptionPane class in Java Swing, which provides a set of pre-built dialog boxes for displaying messages and obtaining user input.
Here's an example of how you can declare an array to store objects of a class, and use a method from the JOptionPane class to request the length of the array from the user:
import javax.swing.JOptionPane;
public class MyClass {
// Define your class according to the UML
public static void main(String[] args) {
// Request the length of the array from the user using JOptionPane
String lengthInput = JOptionPane.showInputDialog("Enter the length of the array:");
// Parse the user input to an integer
int arrayLength = Integer.parseInt(lengthInput);
// Declare the array to store objects of the class
MyClass[] myArray = new MyClass[arrayLength];
// Now you have an array of the desired length to store objects of your class
// You can proceed to instantiate objects and store them in the array
}
}
In this example, we use the showInputDialog method from the JOptionPane class to display an input dialog box and prompt the user to enter the desired length of the array. The user's input is then parsed into an integer using Integer.parseInt() and stored in the arrayLength variable.
Therefore, an array myArray of type MyClass is declared with the specified length, ready to store objects of the MyClass class.
For more details regarding the showInputDialog method, visit:
https://brainly.com/question/32146568
#SPJ2
___________ is a global issue and there is a requirement to find out the interdependencies among the customers and suppliers.
Answer:
Supply chain disruption is a global issue and there is a requirement to find out the interdependencies among the customers and suppliers.
Explanation:
The context suggests we are discussing some type of challenge involving the relationships between customers, suppliers and a larger supply chain. A "global issue" involving "interdependencies among the customers and suppliers" points to potential supply chain disruption or issues in a supply network.
Since there is a "requirement to find out the interdependencies" between customers and suppliers, this suggests we need to identify and analyze how they are connected and dependent upon each other in order to resolve the broader "global issue." This information could then be used to make changes, build resilience or manage risks in the supply chain.
Hope this helps!
Answer:
Internet is global issues