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
Harman [31]
3 years ago
13

The assignment operator has left-to-right-to-left associativity, which means that the value of the expression to the left of the

assignment operator is evaluated first and that the result is assigned to the operator on the right. True or false?
Computers and Technology
1 answer:
postnew [5]3 years ago
4 0

Answer:

The given statement is false statement.

Explanation .

  • The assignment is assigning the value to the variable or we can say that it will also be used to initialize the variable The "=" is the symbol of the assignment operator.
  • For example

        int r=90, The value of variable 90 is assigned to 90.

  • The associativity, of assignment, is always right to left which means The right-hand side is firstly evaluated then it will be assigned in left-hand side variable or expression.  

You might be interested in
WILL GIVE BRAINLIEST!!!!!!!
stellarik [79]
True











Dhahvdbdbrhhehebdbdbbdbd sorry it has to be longer ahhshdjdjhsjdjdbdnbfbfjfj
7 0
2 years ago
Read 2 more answers
You are asked to simulate a binary search algorithm on an array of random values.An array is the list of similar type of element
Alex Ar [27]

Answer:

Explanation:

Problem statement:

to simulate a binary search algorithm on an array of random values.

Binary Search: Search a sorted array by repeatedly dividing the search interval in half. Begin with an interval covering the whole array. If the value of the search key is less than the item in the middle of the interval, narrow the interval to the lower half. Otherwise narrow it to the upper half. Repeatedly check until the value is found or the interval is empty.

Input/output description

Input:

Size of array: 4

Enter array:10  20 30 40

Enter element to be searched:40

The Output will look like this:

Element is present at index 3

Algorithm and Flowchart:

We basically ignore half of the elements just after one comparison.

Compare x with the middle element.

If x matches with middle element, we return the mid index.

Else If x is greater than the mid element, then x can only lie in right half subarray after the mid element. So we recur for right half.

Else (x is smaller) recur for the left half.

The Flowchart can be seen in the first attached image below:

Program listing:

// C++ program to implement recursive Binary Search

#include <bits/stdc++.h>

using namespace std;

// A recursive binary search function. It returns

// location of x in given array arr[l..r] is present,

// otherwise -1

int binarySearch(int arr[], int l, int r, int x)

{

   if (r >= l) {

       int mid = l + (r - l) / 2;

       // If the element is present at the middle

       // itself

       if (arr[mid] == x)

           return mid;

       // If element is smaller than mid, then

       // it can only be present in left subarray

       if (arr[mid] > x)

           return binarySearch(arr, l, mid - 1, x);

       // Else the element can only be present

       // in right subarray

       return binarySearch(arr, mid + 1, r, x);

   }

   // We reach here when element is not

   // present in array

   return -1;

}

int main(void)

{ int n,x;

cout<<"Size of array:\n";

cin >> n;

int arr[n];

cout<<"Enter array:\n";

for (int i = 0; i < n; ++i)

{ cin >> arr[i]; }

cout<<"Enter element to be searched:\n";

cin>>x;

int result = binarySearch(arr, 0, n - 1, x);

   (result == -1) ? cout << "Element is not present in array"

                  : cout << "Element is present at index " << result;

   return 0;

}

The Sample test run of the program can be seen in the second attached image below.

Time(sec) :

0

Memory(MB) :

3.3752604177856

The Output:

Size of array:4

Enter array:10  20 30 40

Enter element to be searched:40

Element is present at index 3

Conclusions:

Time Complexity:

The time complexity of Binary Search can be written as

T(n) = T(n/2) + c  

The above recurrence can be solved either using Recurrence T ree method or Master method. It falls in case II of Master Method and solution of the recurrence is Theta(Logn).

Auxiliary Space: O(1) in case of iterative implementation. In case of recursive implementation, O(Logn) recursion call stack space.

8 0
3 years ago
You have a group of friends coming to visit you for your high school reunion, and you want to take them out to eat at a local re
-BARSIC- [3]

Answer:

Python code is explained below

Explanation:

def RestaurentSelector():

               #stroring the restaurants data

               restaurents=[["Joe's Gourmet Burgers","no","no","yes"],["Main Street Pizza Company","yes","yes","yes"],["Corner Cafe","yes","no","yes"],["Mama's Fine Italian","yes","no","no"],["The Che'fs Kitchen","yes","yes","yes"]]

               #taking the requirements for party

               isVeg=input("Is anyone at your party a vegetarian? ")

               isVegan=input("Is anyone at your party a vegan? ")

               isGF=input("Is anyone at your party a gluten-free? ")

               #printing the info

               print("Hera are your restaurant choices :")

               #loop to check each restaurent

               for x in restaurents:

                               #checking for veg requirement

                               if isVeg=="yes" and x[1]=="no":

                                               #skipping the current restaurent if is satisfying

                                               continue

                               #checking for vegan requirement

                               if isVegan=="yes" and x[2]=="no":

                                               #skipping the current restaurent if is satisfying

                                               continue

                               #checking for glutan free requirement

                               if isGF=="yes" and x[3]=="no":

                                               #skipping the current restaurent if is satisfying

                                               continue

                               #if all requirementws are satisfied

                               #printing the restaurent name

                               print("\t",x[0])

               #exiting the function\

#calling the function

RestaurentSelector()

4 0
3 years ago
Why would a team choose to employ a zone defense over a person to person defense?
vova2212 [387]

Answer/Explanation:

Zone defense is chosen if MULTIPLE people are attacking one spot that's why they would choose zone defense.

Person to person defense is when 1 person is attacking one spot so somebodies sent out to defend it.

<u><em>~ LadyBrain</em></u>

7 0
3 years ago
Refer to the exhibit. Switch SW2 was tested in a lab environment and later inserted into the production network. Before the trun
svet-max [94.6K]

Answer:

Switch SW2 seems to have a greater VTP revision number that creates the VLAN data to be deleted in the VTP domain.

Explanation:

Switch SW2 became examined and eventually placed into another production network. Prior to connecting the trunk connection among both SW1 and SW2, the service provider admin enacted the exhibit vtp status instruction as shown in the monitor. Both clients missed access to the network shortly when the switches got linked.

So, the possible reason for the issue is to Switch SW2 tends to have a larger VTP modification percentage allowing that VLAN data to be removed from the VTP domain.

8 0
3 years ago
Other questions:
  • Jim has excellent oral and written communication skills. He enjoys public speaking and wants a job in which he will interact wit
    10·2 answers
  • how to answer the questions on brainly? I've typed my answer in the box but there's no submit button or whatever, and the only t
    14·2 answers
  • Need help please will mark brainliest
    15·1 answer
  • What is Function of print statement?
    8·2 answers
  • When using a presentation software you can change the size of the text to...? Increase Font size, Decrease font size, increase t
    15·2 answers
  • Which is an aspect of structural-level design?
    6·2 answers
  • In Windows, which menu allows you to view file characteristics?
    14·1 answer
  • What is the CPU's role?
    15·2 answers
  • PLEASE HELP ME!!!
    13·1 answer
  • write a c program to insert and delete values from stack( to perform pop and push operations) using an array data structure
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!