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
Elis [28]
3 years ago
8

Which of the following is a valid variable name? a. salesTax b. input-string c. 25Percent d. double

Computers and Technology
1 answer:
PilotLPTM [1.2K]3 years ago
5 0

Answer:

The correct answer of the given question is option(A) i.e salesTax

Explanation:

Variable are the storage area which value varies during the execution of aprogram .

some of the rules of variable are

1 Variable always start with alphabet.

2 We cannot give variable name any reserve keyword.

3 Variable cannot start with digit.

4 We cannot use special symbol like -,$ to declare any variable

In option (b ) input-string ,it is invalid variable because it uses special symbol "-"  to declared the variable.

In option (c) 25Percent , it is invalid variable because it violate the rule of  variable and start with digit.variable cannot start with digit

In option( d )double, it is invalid variable because it violate the rule of  variable because double is keyword and variable never be a keyword.

So option(A) is correct it follow the rule of variable.

You might be interested in
What new information, strategies, or techniques have you learned that will increase your technology skills?
marshall27 [118]
You can try programming
6 0
3 years ago
Write a multithreaded program that generates the Fibonacci series using Pthreads thread library. This program should work as fol
Mamont248 [21]

Answer:

#include <pthread.h>

#include <stdio.h>

#include <stdlib.h>

pthread_mutex_t mutex;

int fib[10]; /* this data is shared by the thread(s) */

int in = 0;

void *genFibo(void *param); /* the thread */

int main(int argc, char *argv[])

{

   pthread_attr_t attr;  

   if (argc != 2) {

   fprintf(stderr,"usage: fibthread <integer value>\n");

   return -1;

   }

   int count = atoi(argv[1]);

   if (count < 1) {

   fprintf(stderr,"%d must be>= 1\n", count);

   return -1;

   }

   pthread_attr_init(&attr);

   // Mutex Lock

   pthread_mutex_init(&mutex, NULL);

   // each thread computes fibonacci

   for(int i = 1;i <= count;i++) {

   pthread_t thread;

   pthread_create(&thread, &attr, genFibo, (void*)i);

   pthread_join(thread, NULL);    

   }    

   // print resulting array

   for (int i = 0; i < in;i++) {

   printf("%d ", fib[i]);

   }

   printf("\n");

   pthread_mutex_destroy(&mutex);

}

void *genFibo(void *param)

{

   pthread_mutex_lock(&mutex);

   fib[in++] = fibonacci((int)param);

   pthread_mutex_unlock(&mutex);

   pthread_exit(0);

}

int fibonacci (int x)

{

   if (x <= 1) {

   return 1;

   }

   return fibonacci(x-1) + fibonacci(x-2);

}

4 0
3 years ago
Ensuring that users have access only to the files they need to complete their tasks is an example of which principle? A. Separat
Flura [38]

Answer:

Least Privilege

Explanation:

The principle of least privilege an important principle in computer security. It is the practice of limiting access rights for users to the basic minimum or least amount of privilege they require to perform their tasks. For example a user is granted privilege to execute a file or manipulate data or use resources they require to perform a function or task. Therefore, this principle can be used only to limit access rights for programs, systems, and devices to those permissions only that are required to carry out permitted activities. Conforming to principle of least privilege reduces the risk of hackers gaining access to sensitive information or a system, by compromising a user account or device. For example an individual whose task is to enter data into a database only requires option to add records to that DB by the principle of least privilege. If a virus attacks the computer of that individual, this attack is restricted only to creating DB entries.

5 0
3 years ago
Media and social control
Fofino [41]

Answer:

Media:

the main means of mass communication (broadcasting, publishing, and the Internet) regarded collectively.

Social control:

Social control is a concept within the disciplines of the social sciences.

Social control is the study of the mechanisms, in the form of patterns of pressure, through which society maintains social order and cohesion. ... Regardless of its source, the goal of social control is to maintain conformity to established norms and rules.

5 0
3 years ago
As an IT technician for your company, you are in the process of setting up several servers in your network. During the process,
DiKsa [7]

the errors simple yet effective.

5 0
2 years ago
Other questions:
  • The________ format is usually used to store data
    9·1 answer
  • MIDI is a A.technology based on placing brief digital recordings of live sounds under the control of a synthesizer keyboard. B.t
    10·1 answer
  • For your biology class, you will be giving a presentation of the findings of a plant
    14·2 answers
  • Examine the following algorithm.
    9·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    7·1 answer
  • Walt has selected data in a worksheet and inserted a chart. However, the chart is inserted right on top of the data set, and he
    14·2 answers
  • For what purpose do the hackers create the zombies army?
    12·1 answer
  • Select the correct answer from each drop-down menu
    7·1 answer
  • Which platforms are used for mobile apps? Select 4 options.
    7·1 answer
  • Wi-Fi Protected Access (WPA) fixes critical vulnerabilities in the earlier wired equivalent privacy (WEP) standard. Understandin
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!