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
lorasvet [3.4K]
3 years ago
10

T F The exit function can only be called from main .

Computers and Technology
1 answer:
ElenaW [278]3 years ago
5 0

Answer:

FALSE

Explanation:

The exit function is used to terminate or halt the process.

Syntax-

            void exit(int status)  

Exit function (exit()) can be used in any function not only main() and it will terminate your whole process.

<u></u>

<u>Example-</u> C Program

#include<stdio.h>

#include <stdlib.h>  

//  function declaration

float exitexample ( float x );                                

// Driver program

int main( )                

{

 float a, b ;

 printf ( "\nEnter some number for finding square \n");

  scanf ( "%f", &a ) ;

 // function call

 b = exitexample ( a ) ;                      

 printf ( "\nSquare of the given number %f is %f",a,b );  

/*This will not printed as exit function is in exitexample() function*/

}

float exitexample ( float x )   // function definition  

{

 exit(0);    //exit function

   float p ;

  p = x * x ;

return ( p ) ;

}

You might be interested in
In Python write a program that reads a list of integers into a list as long as the integers are greater than zero, then outputs
stealth61 [152]

Answer:

l = []

while True:

 no = int(input())

 if no>0:

   l.append(no)

 else:

   break

print(1)

If this helped consider marking this answer as brainliest. Have a good day.

3 0
1 year ago
Which term refers to a shorthand method for identifying network and host bits in an ip address?
zloy xaker [14]

A CIDR Notation is known as the term that refers to a shorthand method for identifying network and host bits in an ip address.

<h3>What is CIDR Notation?</h3>

This is known to be a term that was devised in 1993 by the IETF. The  CIDR is said to be a  shorthand method for knowing network and host bits in an IP address.

Therefore, one can say that A CIDR Notation is known as the term that refers to a shorthand method for identifying network and host bits in an ip address.

Learn more about CIDR Notation from

brainly.com/question/14985928

#SPJ12

7 0
1 year ago
Which of the following are peripheral devices?
Fittoniya [83]

Explanation:

I think it's speakers,

7 0
3 years ago
Read 2 more answers
In the simulation, player 2 will always play according to the same strategy. The number of coins player 2 spends is based on wha
baherus [9]

The simulation, player 2 will always play according to the same strategy.

Method getPlayer2Move below is completed by assigning the correct value to result to be returned.

Explanation:

  • You will write method getPlayer2Move, which returns the number of coins that player 2 will spend in a given round of the game. In the first round of the game, the parameter round has the value 1, in the second round of the game, it has the value 2, and so on.

#include <bits/stdc++.h>  

using namespace std;

bool getplayer2move(int x, int y, int n)  

{

   int dp[n + 1];  

   dp[0] = false;  

   dp[1] = true;  

   for (int i = 2; i <= n; i++) {  

       if (i - 1 >= 0 and !dp[i - 1])  

           dp[i] = true;  

       else if (i - x >= 0 and !dp[i - x])  

           dp[i] = true;  

       else if (i - y >= 0 and !dp[i - y])  

           dp[i] = true;  

       else

           dp[i] = false;  

   }  

   return dp[n];  

}  

int main()  

{  

   int x = 3, y = 4, n = 5;  

   if (findWinner(x, y, n))  

       cout << 'A';  

   else

       cout << 'B';  

   return 0;  

}

8 0
3 years ago
22. Which of the following device will you require to hear music on
Anon25 [30]

Answer: None

Explanation:

I don’t even knew these.

4 0
3 years ago
Other questions:
  • Failure to verify information can lead to?
    10·1 answer
  • Given the commands below, what do they do? for (position = 1 through aList.getLength()/2) { a = aList.getEntry(aList.getLength()
    11·1 answer
  • What kind of java program runs within a java-enabled browser?
    15·1 answer
  • Which activity does not allow a person to perform any work while at the shop
    10·1 answer
  • What are the best data structures to create the following items? And why?
    13·1 answer
  • Discuss the pros and cons of tombstoning versus multitasking. Why do you think Microsoft chose tombstoning?
    11·1 answer
  • What is alfred anderson in creole?
    6·1 answer
  • Explain the difference between overexposed vs. underexposed images?
    15·2 answers
  • How do we produce quality work in editing audio?
    7·1 answer
  • I need help with my work
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!