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 a graphical user interface, which is a small symbol on the screen whose location and shape changes as a user moves a pointing
ollegr [7]

Answer:

a pointer or cursor

Explanation:

6 0
3 years ago
The optional feature in a business letter is
slamgirl [31]

Answer:

Reference

Explanation:

i don't know how to explain it but that's the answer

5 0
3 years ago
PLEASE HELP!!!!! (Environmental Science Semester 1)
uranmaximum [27]
I believe the answer would be B, Sorry if I'm wrong! ❤
6 0
2 years ago
Read 2 more answers
Identify the following as True or False.
Leni [432]

Answer:

The answer to this question as follows:

1) False

2) False

3) True

Explanation:

The description of the above option as follows

  • In option 1, A single character variable must be contained in one quote mark, but it is based on the alphabet, which is a specific device, and the price of a continued character varies from one device to another, that's why it is false.
  • In option 2, This option is wrong because in assembly language the identifier value must not exceed the length than 247 characters.
  • In option 3, It is correct because in the variable declaration the first char should be a letter, _, @ or $letter. A total of 1-247 characters. The default case is insensitive.

5 0
3 years ago
Write a program that takes in a line of text as input, and outputs that line of text in reverse. The program repeats, ending whe
Nana76 [90]

<u>Answer:</u>

<em>using System; </em>

<em>public class Program </em>

<em>{ </em>

<em> public static void Main() </em>

<em> { </em>

<em> String input ; </em>

<em> while(true) </em>

<em> { </em>

<em>  input = Console.ReadLine(); </em>

<em>  if(input.Equals(""quit"")) </em>

<em>  break; </em>

<em>  Reverse_String(input); </em>

<em> } </em>

<em> return; </em>

<em> } </em>

<em>static void Reverse_String(string input_text) </em>

<em>{ </em>

<em>    char[] text = input_text.ToCharArray(); </em>

<em>    Array.Reverse(text); </em>

<em>    Console.WriteLine(text); </em>

<em>} </em>

<u>Explanation:</u>

<em>In the above program a separate function is written to reverse the string.</em>

This method takes the string as an argument and place it in a array and then use the built-in function reverse and print the reversed string in the console.

<em>In the main(), the input is obtained from the console and it is passed to the reversestring(). </em>

7 0
3 years ago
Read 2 more answers
Other questions:
  • What is a bus master?
    14·1 answer
  • Solar power plants trap the sun’s energy and convert it into electricity. What is a problem associated with this technology?
    11·1 answer
  • Your computer running Windows 7 is doing some very strange things with the operating system. You are fairly certain it is not a
    10·1 answer
  • Device that converts sound into electrical signals, which are sent to the computer or other recording device
    6·1 answer
  • What is the value of length after the code that follows is executed?int[][] nums = { new int [] {1, 2, 3},new int [] {3, 4, 5, 6
    8·1 answer
  • Which two statements are true about the Data Sync functionality? (Choose two.)
    15·1 answer
  • What is the name of the advanced warrior race of robots in Doctor Who?
    10·2 answers
  • Second Largest, Second Smallest Write a program second.cpp that takes in a sequence of integers, and prints the second largest n
    15·1 answer
  • Letter only ^_____^!
    8·1 answer
  • Which statement correctly differentiates how to use list and table styles?
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!