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
viktelen [127]
3 years ago
8

In procedural programming, where does the flow of control usually route from the main function?

Computers and Technology
1 answer:
Zinaida [17]3 years ago
6 0

Answer:

Subroutine or called function.

Explanation:

Procedural programming is a programming techniques of creating modular divisions between lines of code, with a provision to call and run a block of code at any given instance in the program.

A program flow control breaks at will from the main function to a target defined function or subroutine, which returns a value back to the normal flow of the program. It uses conditional and loop statement to achieve its task.

You might be interested in
30 points) Suppose you are given a string containing only the characters ( and ). In this problem, you will write a function to
navik [9.2K]

Answer:

The screenshot is attached below

Explanation:

The below program check balence of paranthesis using stack.

if the input charecter is ( then push to stack

if the input charecter is ) then pop top element and compair both elements for match.

Program:

public class Main

{

static class stack // create class for stack

{

int top=-1; // initialy stack is empty so top = -1

char items[] = new char[50]; // Create an array for stack to store stack elements

 

void push(char a) // Function push element to stack

{

if (top == 49) // chack stack is full ?

{

System.out.println("Stack full");

}

else

{

items[++top] = a; // increment the array index and store the element

}

}

 

char pop() // function to return the elements from stack

{

if (top == -1) // check the stack is empty

{

System.out.println("Empty stack");

return '\0';

}

else

{

char element = items[top]; // return the top element

top--; // Decrement the array index by one

return element;

}

}

 

boolean isEmpty() // Check the stack is empty or not

{

return (top == -1) ? true : false;

}

}

static boolean isMatch(char character1, char character2) // Check the input charecters are matching pairs or not

{

if (character1 == '(' && character2 == ')') // If they match return true

return true;

else

return false;

}

 

static boolean isBalanced(String parantheses) // check the input string is balenced or not

{

char[] exp = new char[parantheses.length()]; // Create a charecter array

for (int i = 0; i < parantheses.length(); i++) { // Convert the string parantheses to charecter array

exp[i] = parantheses.charAt(i);

}

stack st=new stack(); // Declare an empty character stack    

for(int i=0;i<exp.length;i++)

{  

if (exp[i] == '('))   // if input charecter is '(' push to stack

st.push(exp[i]);

if (exp[i] == ')') // if input charecter is ')' pop top element from stack

{

if (st.isEmpty())

{

return false;

}

 

else if ( !isMatch(st.pop(), exp[i]) ) // Call isMatch function

{

return false;

}

}

 

}

 

if (st.isEmpty())

return true; //balanced

else

{

return false; //not balanced

}

}

 

 

public static void main(String[] args)

{

 

System.out.println(isBalanced("()()()")); // Output true if string is balenced

 

}

 

}

Screenshot:

5 0
3 years ago
Which of the following is NOT an argument used to determine how a shot is fired from an A. object the shot itself being instanti
Firdavs [7]
C. The color of the shot...
7 0
3 years ago
________ computers are specially designed computer chips that reside inside other devices, such as a car. Select one: A. Tablet
BartSMP [9]

Answer:

The correct answer to the following question will be Option C (Embedded).

Explanation:

  • An embedded system seems to be a monitoring system that incorporates a computer processor, device storage, and peripheral output/input devices that have a particular function within such a larger electrical or mechanical network.
  • Such devices are chips that are designed specifically and live within other devices or appliances.

The other three solutions can not perform tasks like the embedded computers do or even any other computer can implement the computer's processor. Therefore, it's the right answer.

3 0
3 years ago
Read 2 more answers
Which of the following would most likely be the target audience for a product
inna [77]

Answer:

B

Explanation:

They are saturday morning cartoons. Saturday morning cartoons are meant towards an audience of young children.

3 0
3 years ago
Read 2 more answers
Guess The Song: <br> What Popping Brand New Whip Just Hopped In, I Got options
Georgia [21]

Answer:

its called whats poppin lol

Explanation:

:)

7 0
3 years ago
Other questions:
  • You work for a large enterprise company that handles time-sensitive information. Your supervisor has asked that you set up a con
    8·1 answer
  • To configure a router / modem, what type of IP interface configuration should you apply to the computer you are using?
    8·1 answer
  • What is the process of copying items from ram to a storage device?
    8·1 answer
  • Conduct online research to determine specific conflict-resolution and management techniques and skills that would be beneficial
    5·1 answer
  • The ________________ command tests connectivity by sending an echo request to a remote computer.
    14·1 answer
  • Which of the following about if statement is true? A. The condition is a Boolean expression B. A Boolean expression is something
    15·1 answer
  • What does RFID use for wireless communication?<br> Infrared<br> IoT<br> Smart chip<br> Tag
    14·1 answer
  • What is application software? A computer language for accessing data in a database. A character string used to identify the loca
    10·1 answer
  • 3.26 LAB: Leap Year A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate a
    15·2 answers
  • A student can improve performance by decreasing
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!