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
blondinia [14]
3 years ago
14

Find the mistakes in the following code. Not all lines contain mistakes. Each line depends on the lines preceding it. Watch out

for uninitialized pointers, NULL pointers, pointers to deleted objects, and confusing pointers with objects.
Computers and Technology
1 answer:
Kazeer [188]3 years ago
5 0

Answer:

Explanation:

A null pointer is pointing to nothing, if we can detect if a pointer is null, we can use an "IF" because a null pointer always going to be false, a null pointer even can block an application, because is a result of undefined behavior, it can even cause problems because the compiler can’t tell whether we mean a null pointer or the integer 0, there is a confusion in this kind of pointers.

You might be interested in
Jason is computer professional who has access to sensitive information. He shares this information with another organization in
Temka [501]

<em>Jason violated the </em><em>confidentiality of information. </em>

<em> </em>

<em>Part of information security is "confidentiality of information" wherein an employee must kept all the information he may acquire when he is working in a company, confidential. When we say confidential, he is not allowed to disclose anything that he may know about company's operation, sensitive information to anybody who is outside the company (like in the example, another organization). Because data that he might disclose may get on hands by company's competitors and it can be used against the company. They might steal ideas and strategies. </em>

4 0
3 years ago
A(n) ____________________ is hardware or software that blocks or allows transmission of information packets based on criteria su
QveST [7]

Answer:

The answer is "Packet Filter(144-145)".

Explanation:

This technique is used in firewalls, which monitors access to the network, track data transmission packets, transfer or stop based on IP protocols and ports.

  • This approach is often used to test modulation packets.
  • It also used to control performance and provides security.
  • This mechanism also used in the IPv6.
6 0
3 years ago
Which one of the following rules for selecting a password is the best?
horsena [70]

Answer:

(b) 7 characters: 4 Numbers, 1 Lowercase Letter, 1 Uppercase letter, 1 Symbol

Explanation:

The best rule that makes a password great is that rule that increases the entropy of the password. The entropy of a password is the measure of how easy it is for the password to be cracked e.g by guessing, by brute force cracking, by dictionary attacks and other related cracking methods.

A rule that makes use of a logical combination of the four types of characters - digits, lowercase letters, uppercase letters and special symbols - gives a greater strength to the password than the rules that just make use of the some of the four types of characters.

Increasing the length of the password too is a great way of increasing the entropy of the password. But then, if there is a trade-off between length and combination, the latter is better.

3 0
3 years ago
Read 2 more answers
Write a program, NumberStatistics.java, that reads an unspecified number of integers. The program ends with the input 0. The pro
Lerok [7]

Answer:

Following are the program, which can be below:

import java.util.*; //defining header file

public class NumberStatistics  //defining class NumberStatistics

{

public static void main(String[] arc) //defining main method

{

int total_number=0,max_val=0,min_val=0,neg_val=0,pos_val=0,neg_count=0,pos_count=0,x; //defining variables

Scanner ox= new Scanner(System.in); //creating Scanner class Object

System.out.println("Enter positive and negative value with sign and when complete inter 0:"); //print message  

x= ox.nextInt(); //input value from user

while(x!=0) //defining loop to check input value is 0

{

total_number++; // increment value

if(total_number == 1)  //defining conditional statement to check minimum and maximum value

{

max_val = x; //assign value in max  

min_val = x;//assign value in min

}

else  //defining else block

{

if(max_val < x) //check maximum value

{

max_val = x; //assign maximum value

}

if(min_val > x) //check minimum value

{

min_val = x; //assign minimum value

}

}

if(x > 0) //input values  

{

pos_count++; //count positive value

pos_val+=x; // add positive values

}

else  

{

neg_count++;//count negative value

neg_val+=x; // add negative values

}

x = ox.nextInt(); //input values

}

// defining conditionl statement

if(total_number != 0)  // defining if block to print all value

{

System.out.println("positive value average= "+(pos_val/(double)pos_count));

System.out.println("negative values Average= "+(neg_val/(double)neg_count));

System.out.println("all values average= "+(pos_val+neg_val)/(double)total_number);

System.out.println("maximum value = "+max_val+"\n"+" minimum value = "+min_val);

}

else  

{

System.out.println("no positive values found");

System.out.println("no negative values found");

}

}

}

Output:

Enter positive and negative value with sign and when complete inter 0:

12

8

04

22

-22

-5

9

0

positive value average= 11.0

negative values Average= -13.5

all values average= 4.0

maximum value = 22

minimum value = -22

Explanation:

The Description of the above java program can be described as follows:

  • In the above code first we import the package for user input, then defines the variable "total_number,max_val,min_val,neg_val,pos_val,neg_count, pos_count,x" to store the value prints its value.
  • In the next step, a scanner class object is created for user input and defines a while loop, that checks input value isn't equal to 0, inside the loop a conditional statement defines that cont and calculates all positive, negative, and all values addition.
  • At the another conditional statement is defines, that prints all value average, and also prints maximum, minimum value.
6 0
4 years ago
All of the following are true about solid axles, EXCEPT:
irakobra [83]
Except that solid axles do. It have a break in it
5 0
3 years ago
Other questions:
  • Where can you change your web page SafeSearch settings?
    8·1 answer
  • Why are many otherwise safety-conscious people victims of Internet crime?
    13·1 answer
  • The following program includes fictional sets of the top 10 male and female baby names for the current year. Write a program tha
    15·1 answer
  • Anderson uses his computer and internet link to chart the movement of his favorite 46 stocks. He buys and sells according to the
    15·1 answer
  • Can u suggest me some Hindi movies that is on you-tube please suggest
    7·2 answers
  • What kind of information B2B SaaS companies wish to know about their competition, apart from information about their competitors
    15·1 answer
  • What term is used to refer to the way companies collect and process data in order to create new information to make important bu
    13·1 answer
  • Scenario
    7·1 answer
  • I need some help with this assignment. I'm having difficulty trying come up ideas to use here. Can I get any help?
    5·1 answer
  • In additon to setting up services, what other tasks does a sysadmin have to keep in mind? check all that apply.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!