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
Mashcka [7]
3 years ago
11

Hardcoding numbers (unnamed, literal constants) in code without explanation is a bad programming practice. What are these hardco

ded numbers known as
Computers and Technology
1 answer:
BaLLatris [955]3 years ago
3 0

Answer:

Magic numbers.

Explanation:

In Computer programming, hardcoding can be defined as a software development process which typically involves directly embedding or infusing data into the source code of a computer software application or program rather than generating the data at runtime or sourcing (obtaining) it from an external source.

Hence, hardcoding numbers (unnamed, literal constants) in code without explanation is a bad programming practice. These hardcoded numbers are known as magic numbers.

A magic number refers to a hard-coded value embedded into the source code of a software program without explanation and as such are very difficult to update.

You might be interested in
Explain the relationship between one’s point of view and understanding spoken text
adell [148]

In spoken and audio texts the tone and accompanying sounds convey a point of view. Point of view therefore constructs an attitude towards the subject matter in a text which the reader, listener or viewer is invited to adopt.

Please have a wonderful day <3

6 0
2 years ago
write a function that counts the number of times the value of y occurs in the first n values in array x. y is an integer variabl
mixer [17]

Answer:

Following are the function of count:

void count(int y,int x[],int n) // function definition of count

{

int k,count=0;  // variable declaration

for(k=0;k<n;++k) // iterating over the loop

   {

   if(x[k]==y) //check the conndition number of times the value of y occurs

   {

   count++; // increment of count by 1

   }

   }

Explanation:

Following are the code in c language

#include <stdio.h> // header file  

void count(int y,int x[],int n) // function definition of count

{

int k,count=0;  // variable declaration

for(k=0;k<n;++k) // iterating over the loop

   {

   if(x[k]==y) //check the conndition number of times the value of y occurs

   {

   count++; // increment of count by 1

   }

   }

   printf(" the number of times the value of y occurs :%d",count); // display count value

   }

int main() // main method

{

   int x[100],y,n,k; // variable declarartion

   printf(" Enter the number of terms n :");

   scanf("%d",&n); // input the terms

   printf(" Enter the array x :");

   for(k=0;k<n;++k) // input array x

   {

   scanf("%d",&x[k]);

   }

   printf("Enter the value of y:");

   scanf("%d",&y);// input value y by user

    count(y,x,n); // calling function

   return 0;

}

In the given program we declared an array x ,variable  y and n respectively Input the array x ,y,n  by user after that we call the function count .In the count function we iterate the loop from o position to array length-1 and check the number of times the value of y occurs by using if statement  i.e  if(x[k]==y) if the condition of if block is true then we increment the count variable Otherwise not .Finally display the count variable which describe the number of count.

Output

Enter the number of terms n :5

1

2

2

56

5

Enter the value of y:2

the number of times the value of y occurs :2

Enter the number of terms n :5

1

2

3

56

5

Enter the value of y:26

the number of times the value of y occurs :0

7 0
3 years ago
Who is this person?<br><br><br> Kaneppeleqw. I see them everywhere. Are they a bot? Are they human?
Effectus [21]
I’m not sure. Maybe a human.
6 0
3 years ago
Untuk memberikan keterangan pada bagian bawah halaman dokumen yg akan diulangi pada setiap halaman dokumen yg digunakan fasilita
lisabon 2012 [21]
Fasilitas yg di gunakan adalah footer
5 0
3 years ago
Read 2 more answers
Manuel has set up his network so that some employees can open and view files but are unable to edit them. Others can open, view,
xxMikexx [17]

Answer:

access privileges or privileges

Explanation:

The employees at Manuel's company have different _access privileges _ , based on the situation described.

The permissions to be able to perform some actions on some files are called privileges.  So, some employees have limited privileges (only able to open files, but not to edit them), and other have extended privileges (allowing them to open and edit files).  

Although possible, it's <u>unlikely that the employees have different different antivirus software, broadband connections or firewalls</u>.  And no indication in the situation described lead to think that.

It's unclear in your question if <u>"access privileges</u>" is <u>one or two answer choices</u>.  Usually, we talk about "access privileges" but it would also be just "privileges".   If these are two choices, go for "privileges", since all employees have access to the files,<u> so they don't have different access</u>.

7 0
3 years ago
Other questions:
  • Why is a port scan detected from the same ip on a subnet an alarming alert to receive from yourids?
    5·1 answer
  • Required
    12·1 answer
  • Select the correct answer. Which sentence best describe an effective management strategy? A. Conceal game-related clippings prio
    12·2 answers
  • You have recently resolved a problem in which a user could not print to a particular shared printer by upgrading her workstation
    12·1 answer
  • How computational thinking skills impact software design and the quality of the software applications produced?
    10·1 answer
  • The Department of Homeland Security only deals with threats to national security and does not play a role in helping companies m
    13·1 answer
  • I make a budget of my 1st Gamer PC its good?
    9·1 answer
  • You are the IT Administrator for the CorpNet.local domain. You are in the process of implementing a group strategy for your netw
    13·1 answer
  • The CTRL, ALT, and WINDOWS keys are commonly used for keyboard shortcuts, which are keystrokes that can quickly perform an opera
    9·1 answer
  • How could each of the two-proposed changes decrease the size of an mips assembly program? On the other hand, how could the propo
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!