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]
4 years ago
10

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

Computers and Technology
1 answer:
ElenaW [278]4 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
A programmer is creating an algorithm that will be used to turn on the motor to open the gate in a parking garage. The specifica
Mars2501 [29]

The algorithm which can be used to open the gate under the appropriate conditions is:

  1. Check if the time is during business hours.
  2. If Yes, check if the gate sensor is activated.
  3. If Yes, check if the gate is open.
  4. If it is No, turn on the motor.

<h3>What is an algorithm?</h3>

An algorithm can be defined as a standard formula (procedures) which comprises a set of finite steps and instructions that is typically used for solving a problem on a computer under the appropriate conditions.

This ultimately implies that, an algorithm is a standard, logical formula (procedures) containing the step-by-step rules and instructions for performing a specific task or proffering a solution to a specific problem on a computer system.

In this scenario, the algorithm which can be used to open the gate under the appropriate conditions is:

  1. Check if the time is during business hours.
  2. If Yes, check if the gate sensor is activated.
  3. If Yes, check if the gate is open.
  4. If it is No, turn on the motor.

Read more on algorithm here: brainly.com/question/24793921

5 0
2 years ago
Why CD-ROM is more reliable than floppy disk?​
irakobra [83]

Answer:

See explanation below.

Explanation:

The CD-ROM is a hard surface. Data is burned into the CD-ROM using a laser. The information in the CD-ROM is pretty stable and usually safe for a long time.

A Floppy Disk is a less hard surface. It is a thin film of magnetic material. Data is stored on the Floppy Disk using a targeted magnetic field. The information can be damaged by getting the disk close to a magnetic source. Even small grains of dust can cause a Floppy Disk to lose data.

This is why a CD-ROM is more reliable than a Floppy Disk.

Hope this helps! Have an Awesome Day!! :-)

3 0
3 years ago
Why transportation RFP is important?​
liberstina [14]
Accurate and relevant information , a quick process
8 0
4 years ago
I WILL MARK BRAINLIEST IF CORRECT!!!!!!!!!!!!!!!!!!!!!!!!!!!!
e-lub [12.9K]

the second answer is correct

7 0
3 years ago
Read 2 more answers
Encoding in the information processing theory is the process of _____
Katyanochek1 [597]

Encoding in the information processing theory is the process of inputting of information into the memory system.

<h3>What is encoding?</h3>

Encoding is an act or a system method that is used in the inputting of information into the computer memory system.

It entails the storage in the retention of encoded information. After encoding is the Retrieval method that is the act of getting the information out of memory.

Learn more about encoding from

brainly.com/question/3926211

8 0
2 years ago
Other questions:
  • What impacts the types of logs and events logged on a server?
    14·1 answer
  • What does the Auto Fill tool do?
    15·2 answers
  • Create an array of strings. Let the user decide how big this array is, but it must have at least 1 element. Prompt them until th
    8·1 answer
  • Clunker Motors Inc. is recalling all vehicles from model years 2001-2006. Given a variable modelYear write a statement that prin
    8·1 answer
  • Conduct online research on web authentication and define what it is. Describe different authentication methods
    5·1 answer
  • What information is stored in the file system?
    5·1 answer
  • In the following code, use a lock to protect any data that might need protecting. Keep your critical sections as small as possib
    8·1 answer
  • Just help :(((((((((((((((((((((((((((((((((((
    14·1 answer
  • What is 1 st genaration of computer ​
    14·2 answers
  • Why would you browse by entering a URL rather than use a link in a Web page
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!