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
trapecia [35]
3 years ago
8

Consider the classes below: public class TestA { public static void main(String[] args) { int x = 2; int y = 20 int counter = 0;

for (int j = y % x; j < 100; j += (y / x)) { counter++; } } } public class TestB { public static void main(String[] args) { int counter = 0; for (int j = 10; j > 0; --j) { ++counter; } } }
Computers and Technology
1 answer:
Natali5045456 [20]3 years ago
8 0

Answer:

Option d (neither a or b is true) is the correct answer for the above question.

Explanation:

Missing information : The options and the main question (which is true from the following) is not mentioned in the above question.

There is a two program given in the above question and asked to justify the true statement. The options descriptions are as follows:-

  • Option a states that the value of a counter variable will not be the same for both the program, which is not correct because both program loop will be executed 10 times only and the value of the counter will also be 10.
  • Option b states that the value of j will not be different for both the program which is also not correct because the first program loop will process from 10 to 1 by the difference of 1 but the second for loop will execute for i value from 0 to 90 by the difference of 10.
  • Option c states to right for both the option which is not correct.
  • Option d states to wrong for both the correct option. Hence option d is the correct answer.
You might be interested in
Cuantos puntos de habilidad se puede tener en clubes pro?
trapecia [35]

Answer: Tu Pro virtual puede conseguir hasta 110 puntos de habilidad. De esos 110 puntos, 95 se pueden conseguir jugando partidos, mientras que los 15 restantes son los puntos de habilidad iniciales otorgados a tu Pro virtual en el momento de crearlo.

HOPE THIS HELPS

5 0
3 years ago
which of these should be reportable diseases to protect public health? A. Obesity B. Diabetes C.Measles D. Lung Cancer
ohaa [14]
It would be measles or obesity
6 0
3 years ago
Read 2 more answers
. Write a recursive function names factorial to compute the factorial of the parameter. Also write the main function, where you
r-ruslan [8.4K]

Answer:

Following are the code in c language

#include <stdio.h> // header file

long int factorial(int n); // declaration of factorial function

int main() // main function

{

   int n; // variable declaration

   printf("Enter a positive integer: ");

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

   while(n<0) // checking the condition if number is negative

{

    printf("please enter a positive number:");

    scanf("%d", &n);

}

   printf("Factorial of %d = %ld", n, factorial(n)); // calling  factorial function

   return 0;

}

long int factorial(int n1) // recursive definition of factorial

{

   if (n1 >= 1)

       return n1*factorial(n1-1);

   else

       return 1;

}

Explanation:

In this program, it ask for a positive number input. if the value enter by user is negative then it again ask for positive input i.e positive number. Then it calls the recursive function of factorial. the recursive function factorial calculate the factorial recursively. suppose user input 4 then it goes to the if  part of program i.e return n*factorial(n-1); that means return 4*factorial(3) again recursive function call itself .this process repeated until it meets the base condition.  when a base condition meets, it return factorial of the given number.

output

Enter a positive integer: 5

factorial of 5=120

Enter a positive integer: -8

please enter a positive number:4

factorial of 4=24

4 0
3 years ago
Security administrator for your organization utilized a heuristic system to detect an anomaly in a desktop computer's baseline.
Helen [10]

Answer:

Zero day

Explanation:

Zero day attack is the term used to describe the threat of an unknown security vulnerability in a computer software or application for which either the patch has not been released or the application developers were unaware of or did not have sufficient time to address.

Since the vulnerability is not known in advance, the exploits often occur without the knowledge of the users. A zero day flaw is considered as an important component when designing an application to be efficient and secure.

3 0
4 years ago
You need to deploy a new cloud-based windows intune deployment to manage mobile devices in your organization. drag and drop the
Elena L [17]

Answer:

step 1: sign up for an intune account

step 2: create intune user accounts

step 3: define intune policies

step 4: enroll mobile devices

step 5: link mobile devices to users.

Explanation:

The Microsoft Windows intune is a Microsoft cloud-based service that provides a central cloud service for all subscribed and linked devices. It provides a sense of security of data resource and tracking of device activities.

A company subscribes to intune to allow the use of both cooperate and BYOD (bring your own device to work), to access data. First, the administrator sign up and create the intune account, then defined the intune security policies. Then it enrolls the individual devices and links them to their respective users.

3 0
3 years ago
Other questions:
  • A windows computer is shared between several users, each with his own local user account. Each user has his own dedicated, uniqu
    9·1 answer
  • What’s the keyboard command I will allow you to copy text
    11·2 answers
  • A project team was researching the risks involved in setting up a computer system. They decide to go ahead with their plan, rega
    7·1 answer
  • Write a program that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follo
    13·1 answer
  • The ________ is the heart of the operating system and controls its most critical processes.
    9·1 answer
  • Your electric service has been failing with some frequency lately because of a lot of storms, and you are looking for more peace
    14·1 answer
  • What software would you recommend for design?
    7·1 answer
  • Consider the following high-level recursive procedure: long long int flong long int n, long long int k long long int b b k+2; if
    9·1 answer
  • Tim is creating a page to display his poker club’s set of rules. He has main categories and subcategories along with about a par
    12·1 answer
  • Which category of app does word processing software fall into?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!