Answer:
true
Explanation:
FUNCTION: functions are the collection of statements which are used in C programming any program that can not be run without a function, anyone can divide their code in different functions. A function declare the compiler about the name of the function , a function definition provides the actual body of the function so from above discussion it is clear that the function should be given names that reflects their purpose
Which ofthe following must NOT be adopted in preparing disappointing newsmessages?
a- Use sales-promotionmaterial whenever appropriate.
b- Consider using animplicit refusal rather than an explicitrefusal.
c- Capitalize on what youcan do for the reader rather than what you cannotdo.
d- Use negative words orphrases.
Answer: D) Use negative words or phrases.
Explanation:
Use negative words or phrases must not be adopted in preparing disappointing news messages as if news itself is a disappointing then there is no need to support that idea with no hope. So, we should always using helpful data and path of positive way as, it is the best choice.
The ____ operation on a queue returns the last element in the queue, but does not remove the element from the queue
A.
front
B.
back
C.
pop
D.
push
Answer:
back
Explanation:
queue is the data structure which perform operation in particular order. the order is first in first out (FIFO).
it means the element which comes first, remove first.
front: it is used to fetch the first element or oldest element in the queue.
back: it is used to fetch the last element or newest element in the queue.
pop: it is used to remove the first element or oldest element in the queue.
push: it is used to insert the element at the back in the queue.
Therefore, the back is the correct option.
Final answer:
The operation that returns the last element in a queue without removing it is known as the 'back' operation.
Explanation:
The front operation on a queue returns the last element in the queue but does not remove the element from the queue.
The operation on a queue that returns the last element in the queue, but does not remove the element, is known as the back operation. Unlike the pop operation, which removes the element from the queue, the back operation simply allows us to see what the last element is without altering the queue's content. This is particularly useful in scenarios where you need to make a decision based on the last element without actually consuming it.
What will the following code print out: int numbers [] = {99, 87, . 66, 55, 101}; for (int i = 1; i < 4; i++) cout << numbers [i] << end1;a) 99 87 66 55 101 b) 87 66 55 101 c) 87 66 55 d) Nothing.
Answer:
87 66 55
Explanation:
Array is used o store the multiple values with same data type.
the array show a decimal value .66, i assume this is enter by mistake because option has no decimal value.
The index of the array is start from zero, it means the first element store in the array at position zero.
In the for loop the variable 'i' start from 1 not zero and it goes to i<4 means i=3.
So, it access the element from 2 to 4 because the index is position of element less than 1.
Therefore, 87 66 55 print.
What is the purpose and significanceof the following programming constructs in any programminglanguage
a) Variable
b) Constant
c) Assignment Initialization
Answer:
a) Variable-A variable is a symbolic name (or reference to) data. The name of the variable reflects what data the variable includes.It's purpose is to saving a data on particular point,it is a name of the address we want to operate.
Example-a,a1,a23,abc,abh_tr etc.
It should start with the characters, it may include numbers but not in starting and also the underscore at the starting.
b)Constant-A Constant is a value that we can't change, we stores it like a variable.The significance of constant : it's just a poor style to change the velocity of light, the value of pi, and other things like that. if we assumes some value it may produce an error, so making them constants is a type of defensive programming.
Example- pi=3.14 etc.
c) Assignment Initialization-The process of assigning a specific value to a variable at any point in a program or code because of the program logic requirement is known as an assignment operation.
Initialization-Defines and gives an original value in the same declaration to a stated variable.
Example int x = 7;
In this we can initialize the type of variable like - integer,floating etc.
We can declare the variable value in the same line.So,it helps in removing lines and saves time.
A is the smallest unit of application data recognized bysystem software.
1 Row
2 Field
3 Record
4 Table
Answer:
A FIELD is recognized as the smallest unit of application data by system software.
Explanation:
Field is recognized as the smallest unit of application data by any system software. The data in relational data base management system ( RDBMS ) is stored as rows also called as database records or simply records. Each record is a row in database and each record contains fields. Columns in data base are nothing but the fields of all the records. They types of fields are fixed length and variable length.
Every object in asequence container has a specific position.
a. True
b. False
Answer: a)True
Explanation: A sequence container is a class which has the sequence of the objects present in it .By having the objects in a sequence it has a specific position that is given to the objects to keep them in a particular order .the sequence of objects can be like first object, second object , third object ...etc. Therefore the statement given is true that every object in a sequence container has a specific position.
Which of the following statements is FALSE?
a. Nonbottleneck resources have slack capacity.
b. A bottleneck resource must have a utilization of 100%.
c. Nonbottleneck resources have a less than 100% utilization.
d.A bottleneck resource does not always have the longest processing time.
You may not use the break statement in a nested loop
True False
Answer:
You may not use the break statement in a nested loop - False
Some misconceptionsabout communication are:
o Communication solves all problems.
o Communication physically breaks down.
o The meaning we attach to a word will be themeaning everyone else attaches to
the word.
o All of the given options
Answer:
All of the given options
Explanation:
Great question, it is always good to ask away and get rid of any doubts that you may be having.
Communication is an insanely important and useful, but there are a lot of misconceptions about communication. Based on the answers given in the question, the correct answer would be "All of the Given Options"
Communication can solve many problems but the statement that it can solve all problems is not completely accurate. Whether communication can solve a specific problem depends varies from person to person.
Communication can physically break down since not everyone speaks the same language not everyone can understand each other. Also another physical way is that certain dialogue choices can lead to physical confrontation.
Lastly, the meaning of a word can mean different things to different people. For example, "Happiness" every single person has a unique definition of happiness while others simply say it doesn't exist.
I hope this answered your question. If you have any more questions feel free to ask away at Brainly.
what impact did the technical standard have on software development?
Answer:
The technical standard had a huge impact on the world of software development.
Explanation:
In the world of software development and coding in general, every coder has a specific style. Which can cause confusion when working with other coders, which in term causes errors. The Technical Standard allows Everyone to communicate with one another in a way that everyone will understand. Thus allowing for smoother development and less errors.
I hope this answered your question. If you have any more questions feel free to ask away at Brainly.
You are required to write a calculator for Geometric shapes(Circle, Square, and Rectangle). The basic idea is that you willprovide the information regarding a geometric shape and yourprogram will calculate the area, circumference and perimeter.
Answer: The c++ program to calculate area and perimeter for different geometric shapes is given below.
#include <iostream>
using namespace std;
void circle();
void square();
void rectangle();
int main() {
string shape;
char choice;
do
{
cout<<"Enter the geometrical shape (circle, square, rectangle)." <<endl;
cin>>shape;
if(shape == "circle")
circle();
if(shape == "square")
square();
if(shape == "rectangle")
rectangle();
cout<<"Do you wish to continue (y/n)"<<endl;
cin>>choice;
if(choice == 'n')
cout<<"quitting..."<<endl;
}while(choice != 'n');
return 0;
}
void circle()
{
float area, circumference;
float r, pi=3.14;
cout<<"Enter the radius of the circle"<<endl;
cin>>r;
circumference = 2*pi*r;
area = pi*r*r;
cout<<"The circumference is "<<circumference<<" and the area of the circle is "<<area<<endl;
}
void square()
{
float area, perimeter;
float s;
cout<<"Enter the side of the square"<<endl;
cin>>s;
perimeter = 4*s;
area = s*s;
cout<<"The perimeter is "<<perimeter<< " and the area of the square is "<<area<<endl;
}
void rectangle()
{
float area, perimeter;
float b, h;
cout<<"Enter the breadth of the rectangle"<<endl;
cin>>b;
cout<<"Enter the height of the rectangle"<<endl;
cin>>h;
perimeter = 2*(b+h);
area = b*h;
cout<<"The perimeter is "<<perimeter<< " and the area of the rectangle is "<<area<<endl;
}
OUTPUT
Enter the geometrical shape (circle, square, rectangle).
circle
Enter the radius of the circle
3.56
The circumference is 22.3568 and the area of the circle is 39.7951
Do you wish to continue (y/n)
n
quitting...
Explanation:
The program performs for circle, square and rectangle.
A method is defined for every shape. Their respective method contains the logic for user input, computation and output.
Every method consists of the variables needed to store the dimensions entered by the user. All the variables are declared as float to ease the computation as the user can input decimal values also.
No parameters are taken in any of the methods since input is taken in the method itself.
Public classes are accessible by all objects, which means that public classes can be ____, or used as a basis for any other class.
a.
copied
b.
used
c.
saved
d.
extended
Answer:
The correct answer is d.extended.
Explanation:
In order to have a superclass in Java, it is indispensable to extend, or inherit from, a class. It means that a subclass is created by an extended class. All the classes in Java only need one superclass from which it inherits some of its fields and methods.
Answer:
d.extended
Explanation:
The answer is d.
You usually has a top public class, for example, animals, with it's own attibutes. Then you can have other classes extending animals, for example, cats. These classes have both the attributes of the parent class, and their own attributes.
So the code goes something like this
public class Animals{
public Animals(){
\\constructor with attributes
}
\\code
}
public class Cats extends Animals{
public Cats(){
\\constructor with the extra attributes.
}
\\code
}
Write a program that will prompt the user to input ten student scores to an array. The score value is between 0 –100. The program will display the smallest and greatest of those values. It also displays the average score.
Answer:
#include <iostream>
using namespace std;
int main()
{
float arr[10];
float sum=0.0;
for(int i=0;i<10;i++){
cout<<"enter the 10 student record (0-100): ";
cin>>arr[i];
}
float min=arr[0];
float max=arr[0];
for(int i=0;i<10;i++){
if(arr[i]<min){
min=arr[i];
}
if(arr[i]>max){
max=arr[i];
}
sum = sum+arr[i];
}
float avg = sum/10;
cout<<"Smallest score: "<<min<<endl;
cout<<"Largest score: "<<max<<endl;
cout<<"Average score: "<<avg<<endl;
return 0;
}
Explanation:
Create the main function in the c++ programming and declare the variables.
Then, use the for loop to enter the scores 10 times in the array.
another for loop is used to traversing the array and check for smallest and largest and also calculate the sum of all element in the array.
for check smallest, define the temporary variable min with first element of array.
then, if statement check each element with the min and update the min if condition true.
similarly for largest.
after that, take the average by dividing the sum with total number of element in array.
finally print the output.
what is last mile in VOIP
Answer: Last mile is specific phrase that is referred to the customer in a technological field. VoIP(Voice over internet protocol) processes used to connect the customer through the voice communication with the help of internet protocol.
Explanation:
Voice over internet protocol is the protocol which uses voice communication to communicate by the help of internet as transmission medium .The terms last mile can be termed as 'last" -final layer and "mile"- length or distance of the total voice communication .
Last mile of the internet field in VoIP is the reaching of service to customer or the end user which is the last layer . The quality of service cannot be assured for the last mile and the speed , bandwidth etc factors also get effected in the communication. Therefore the last mile in the VoIP basically establishes the connection of the first mile to last mile that is the voice communication from service sender to the user .
In its entirety, the CCM process reduces the risk that ANY modifications made to a system result in a compromise to system or data confidentiality, integrity or availability. TRUE or FALSE
Answer: True
Explanation: CCM process is the process which basically watches over any change or modification that is being made in the data and it will only be implemented when there is no adverse effect of the change.It procedure helps in reducing the risk due to any modification made in data of a system. CCM process also take care of the confidentiality of data and integrity as well and helps inn maintaining it.Therefore the given statement is true.
Why we call the standard deviation of the sample statistic asstandard error of the statistic?
Answer:
The standard deviation of the sample statistics are known as the standard error of the statistics as, standard error are the technique of the measurement of the error in standard deviation method. Basically, the difference between the actual value and the estimate value is the method of the standard deviation. In this given method, the actual value are the unknown quantities which are estimated in the deviation.
The process of acquiring data for a program to use is called:
Select one:
a. data entry
b. graphical user interface
c. input
d. display
e. concatenation
Answer:
a. Data Entry
Explanation:
Great Question, it is always good to ask away and get rid of any doubts you may be having.
The process described in the question is called Data Entry and/or Data Acquisition. Data is gathered and stored in the computers memory to then be used by a specific program or function. Without this data being gathered the program or function cannot complete its task. Therefore Data Entry is extremely needed for the correct and healthy function of a program.
I hope this answered your question. If you have any more questions feel free to ask away at Brainly.
write a C++ program to enter a text and count how many times one letter appear in the text?
Answer:
#include <iostream>
#include<map>//to inlude hashmap..
#include<string>
using namespace std;
int main() {
string sa;//declaring a string s.
map<char,int>m;// A hashmap of char type key and integer type value.
cout<<"Enter the text"<<endl;
cin>>sa;//taking input of the string..
for(int i=0;i<sa.length();i++)
{
m[sa[i]]++;//increasing the count of character in the hashmap..
}
for(auto i:m)//iterating oveer the hashmap m
{
cout<<i.first<<" "<<i.second<<endl;//displaying the character and the count..
}
return 0;
}
Explanation:
I have taken a hashmap m and a string s .I am taking input of text in the string s.The hashmap is of type key =Char and value = int to store the count.After that iterating over the string and updating the count in the hashmap of each character and then printing the count of each character..
What is meant by instruction pipelining in RISC processor? Whatare
'/ the problems that may accompany this technology?
Answer:
Explanation:
The instruction pipelining refers to various stages the instruction has to go through for the full execution of the instruction. Each instruction undergoes various stages in the execution, they are Instruction Fetch, Instruction Decode, Address Generator, Data Fetch, Execution and Write Back. Not every instruction may go through all the stages stated above. Pipelining exploits the parallelism in the execution of instructions (executing multiple instructions simultaneously ). Each instruction might be at different stage in the execution of program. It can be a 3-stage pipelining or 5 stage pipelining.
The implementation of Pipelining is a complex procedure.
In branch instructions, the complexity increases with the number of stages of pipeline.
__________ is a mathematical model of a real system in the form of a computer program.
(A) Transmitter
(B) Spreadsheet
(C) Simulation
(D) Modulation
Simulation is a mathematical model of a real system in the form of a computer program.
Answer is Simulation- (C)
Answer:
The correct answer is letter "C": Simulation.
Explanation:
A computer simulation is an algorithm, computer software or a network of servers that have the goal of creating a simulation of an abstract model of a given system. The model is made up of equations that replicate the functional relationships that the real system could have.
You have the templates of 2 classes, Person and Program. The Person class has 4 attributes, name, age, major and gpa. There is a constructor for the class that is used to make Person objects. There are setter/mutator methods and getter/accessor methods for those attributes. There is also a printInfo() method that prints out information about the person. The Program class has a main method that has 5 Person objects person1 to person5 declared and initialized. The main method within the class also has a Scanner object that is used to take input for a person number and a newGPA. Your task is as follows:
a. Based on the input of personSelect select the appropriate person and change their GPA to the newGPA input and then print out their information. For instance if the user types in 1 then select person 1 and print out their information using the printInfo method. Do it for all possible inputs from 1 to 5.
b. If however the input is not 1 to 5 then inform the user they have to have to type in an appropriate person number
Person.java
public class Person {
String name;
int age;
double gpa;
String major;
public Person(String aName, int aAge, String aMajor, double aGpa)
{
name = aName;
age = aAge;
gpa = aGpa;
major = aMajor;
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String pname) {
name = pname;
}
/**
* @return the age
*/
public int getAge() {
return age;
}
/**
* @param age the age to set
*/
public void setAge(int page) {
age = page;
}
/**
* @return the gpa
*/
public double getGpa() {
return gpa;
}
/**
* @param gpa the gpa to set
*/
public void setGpa(double pgpa) {
gpa = pgpa;
}
/**
* @return the major
*/
public String getMajor() {
return major;
}
/**
* @param major the major to set
*/
public void setMajor(String pmajor) {
major = pmajor;
}
public void printInfo()
{
System.out.println("#########################");
System.out.println("Business College ");
System.out.println("Name: " + name);
System.out.println("Major: " + major);
System.out.println("GPA: " + gpa);
System.out.println("#########################");
}
}
Program.java--------------------------------------------------------------------------------
import java.util.Scanner;
public class Program {
public static void main(String[] args) {
//Declare person objects here
Person person1 = new Person("Dewars",40 , "MIS", 3.9);
Person person2 = new Person("Budweiser",23 , "MIS", 3.2);
Person person3 = new Person("Appletons",25 , "MIS", 3.0);
Person person4 = new Person("Beam",20 , "Finance", 3.7);
Person person5 = new Person("Daniels",19 , "Accounting", 2.9);
Scanner scan = new Scanner(System.in);
System.out.println("Type in a person number whose gpa you would like to change > ");
int personSelect = scan.nextInt();
System.out.println("Type in the gpa you would like the person's to be > ");
double newGPA = scan.nextDouble();
/*
* CODE HERE
*/
}
}
Answer:
Hi, I'm going to put the code answer here and you put in the corresponding line to not copy all the code in the answer.
replace the following line or adjust to the following code
/*
* CODE HERE
while(personSelect <= 0 || personSelect > 5) {
System.out.println("Wrong number, try to input the number in range 1 to 5" );
personSelect = scan.nextInt();
}
if(personSelect == 1){
person1.setGpa(newGPA);
printInfo()
}
else if(personSelect == 2){
person2.setGpa(newGPA);
printInfo()
}
else if(personSelect == 3){
person3.setGpa(newGPA);
printInfo()
}
else if(personSelect == 4){
person4.setGpa(newGPA);
printInfo()
}
else {
person5.setGpa(newGPA);
printInfo()
}
*/
Explanation:
According to the description of code, we have to add some lines to resolve the questions.
a):
In base on the input, we have to modify the attribute GPA with the method setGpa depending on the person chosing. We call the person chosen before and also call the method setGpa( ) and pass as parameter the GPA value obtained in tha last input
b)
In this case we have to create a loop for iterate the times that is necesary to get a value of person that is permit in range 1 to 5, and hence that we create and individual if condition to assign the GPA to the person chosen.
I hope it's help you.
Convert the following decimal numb er (450)m into octal number system ? Convert the following binary number 1101100000110 into itsoctalequivalent ? Describe the function table of AND, OR, and NAND ?
Answer:
450 =(702)₈
1101100000110=(15406)₈
Refer to the images for the Truth tables for the AND , OR , NAND gates.
The output of OR gate is High when either of the inputs is 1.It is 0 only when both the outputs are 0.
The output of AND gate is 1 only when both the inputs are 1.If either of the input is 0 output is 0.
The NAND gate is Not AND gate So we have to just reverse the output of AND Gate.Replace 0's to 1's and vice-versa.
The ____ algorithm tries to extend a partial solution toward completion
A.
backtracking
B.
recursive
C.
backordering
Answer: Backtracking
Explanation:
Backtracking algorithm approaches a solution in a recursive fashion whereby it tries to build answers and modify them in time intervals as we progress through the solution. One such backtracking algorithm is the N Queen problem whereby we place N Queen in a chessboard of size NxN such that no two queens attack each other. So we place a queen and backtrack if there is a possibility that the queen is under attack from other queen. This process continues with time and thereby it tends to extend a partial solution towards the completion.
Array of array in ________is not fixed but in ____it is in arectangle.
C# , Java
C++ , C#
Java , C++
C++ , Java
Answer: C# , Java
Explanation:
In C# we have an array of array but it is not fixed as it can have different dimensions. Its elements are interface type and are initialized to null.
In java the elements of an array can be any type of object we want such as it can be a rectangle.
In java we can use
String[ ][ ] arrays = { array1, array2, array3, };
Here the string array consist of arrays 1,2,3.
Answer: C# , Java
Explanation:
In C# we have an array of array but it is not fixed as it can have different dimensions. Its elements are interface type and are initialized to null.
In java the elements of an array can be any type of object we want such as it can be a rectangle.
In java we can use
String[ ][ ] arrays = { array1, array2, array3, };
Here the string array consist of arrays 1,2,3.
What are the light sources offiber optics?
Answer:
Light sources of fiber optics are used to inject light into a fiber optic cable. There are two varieties of light sources: laser diodes and light emitting diodes (LEDs) . They’re further differentiated by the wavelength and the type of cable.
LEDs are economical, slow in speed, easy to handle, multi mode-only, and have a wide output pattern.
Laser diodes are of expensive and faster than LED's, allow single-mode or multi mode both , and have a narrow output pattern.
What is an algorithm, and what areits main characteristics?
Answer:Algorithm is a step-vise instructions that form a procedure to solve a particular problem. Characteristics of algorithm are:-
InputoutputFinite instructionsEffectivenessExplanation: Algorithm is the step by step instructions that are present to give the desired output by giving the proper input instructions.There are many characteristics of a good algorithm. Some of the major characteristics are as follows:-
Input-the input should be given in proper steps to get the desired output Output-the output is usually is one or more which is derived from the input instructions.Finite instructions-it is desired that the given instruction should be in a finite number of steps.Effectiveness- it is expected that the algorithm should be in basic form and effective enough to be understood easily.What are the asynchronous protocolsin data link layer?
Answer: Asynchronous protocol in data link layer is defined as the protocol which works with single characters or byte and not in the form of blocks of data.
Explanation: Data link layer has the asynchronous protocol which deals with single byte or character at a time rather than working in block order for the data.the data is transferred from one node to another node in individual byte or character and it is observed that the data bytes that are sent is received in the same form .
when organizations request for bids for contracts on their own website procurement, such business is classified as an
A. sell-side marketplace
B. none of these
C. buy-side marketplace
D. electronic exchange
Answer:
When organizations request for bids for contracts on their own website procurement, such business is classified as an sell-side marketplace -A.
When organizations request for bids for contracts on their own website procurement, such business is classified as an sell-side marketplace sell-side marketplace.
Which element would the search element be compared to first, if abinary search were used on the list above?
4
35
44
98
Answer:
35
Explanation:
Binary search is more efficient than linear search,time complexity of binary is 0(logn) where as linear's 0(n).In binary search we search from the middle of the array,whereas in linear we start with index 0 until the last.
4
35
44
98
List contains 4 elements, for finding the middle element we will divide by 2 .
4/2=2 so at the index 2 -35 is present ,we will start checking from 35.
Write a "while" loop equivalentto the following "for" loop: (2Points)
int i,tt = 0;for (i = 0; i < 12; i += 3){t = t + i;cout << t;}cout << endl;
Answer:
int i,t = 0;
i=0; //initialize
while(i<22){
t = t + i;
cout << t;
i += 3; //increment
}
cout << endl;
Explanation:
Loops are used to execute the part of the code again and again until the condition is not true.
In the programming, there are three loop
1. for loop
2. while loop
3. do-while loop
The syntax of for loop:
for(initialize; condition; increment/decrement){
statement;
}
The syntax of while loop:
initialize;
while(condition){
increment/decrement;
}
In the while, we change the location of initializing which comes before the start of while loop, then condition and inside the loop increment/decrement.