What is the smallest floating number can be represented in C++? -3.4*10^38

Answers

Answer 1

Answer:

FLT_MIN.

Explanation:

In C++ FLT_MIN is used to represent the smallest floating point number.You have to include two libraries for FLT_MIN to work and these are as following:-

limits.h

float.h

for example:-

#include <iostream>

#include<limits.h>

#include<float.h>

using namespace std;

int main() {

   cout<<FLT_MIN;

return 0;

}

Output:-

3.40282e+38


Related Questions

. What are regressions?

Answers

Answer:

 Regressions is the statistical analysis that is basically used for the measurement in different type of the investing data and financial data.

It is basically used to determined the relationship between the depended and independent variable.

By using regression, it include various types of the technology for analyzing and modeling various types of variable. It is also used in many business to predict the various exchange rate and stock prices.

Write program to calculate the sum of the following series where in is input by user. (1/1 + 1/2 + 1/3 +..... 1/n)

Answers

Answer:

#here is code in Python.

#read the value n from user

n=int(input("enter the value of n:"))

#variable to store the total sum

sum_n=0

for i in range(1,n+1):

# find the sum of series

   sum_n=sum_n+1/i

#print the sum

print("sum of the series is: ",sum_n)

Explanation:

Read the value of n from user. Create and initialize a variable sum_n with 0. Run a for loop to calculate sum.Initially sum_n is 0, then for value of i=1  1/i will be added to the sum_n.Then in next iteration for i=1, 1/2 added to sum_n. Similarly loop will run util i equals to n.Then sum_n will store the sum of the

series.

Output:

enter the value of n:5

sum of the series is:  2.283333333333333

write a program to insert student grade and print the following

90 -> A
> 80 -> B
> 70 -> C
> 60 -> D
< 60 -> "Fail"

Answers

Answer:

The answer is the program, in the explanation

Explanation:

I am going to write a C program.

int main(){

int grade = -1; /*The grade will be read to this variable*/

/*This loop will keep repeating until a valid grade is inserted*/

while(grade < 0 || grade > 100){

         printf("Insert the student's grade: %n");

         scanf("%d", &grade);

}

/*The conditional according to the grade value*/

if (grade >= 90){

     printf("Your grade is A\n");

}

else if (grade >= 80 && grade < 90){

     printf("Your grade is B\n");

}

else if (grade >= 70 && grade < 80){

     printf("Your grade is C\n");

}

else if (grade >= 60 && grade < 70){

     printf("Your grade is D\n");

}

else{

    printf("You got a failling grade\n");

}

return 0;

}

. Why use a sensitivity analysis?

Answers

Answer:

 Sensitivity analysis is the method in which it basically predict the final outcome of the decision. It analysis each variable individually and identify the dependency of the output value on the particular value of the input.  

The advantage of the sensitivity analysis is that it reduce the overall risk of the particular strategy and also impact of the system.

It basically work on the basic principle that firstly changed the structure and model and then observe the particular behavior of the model.

-Write a function is_perfect, which accepts a single integer as input. If the input is not positive, the function should return a string "Invalid input." If the input is positive, the function should return True if the input is a perfect number and False otherwise.

Answers

Answer:

// here is code in C++.

#include <bits/stdc++.h>

using namespace std;

// function

string is_perfect(int n)

{

   // string variables

   string str;

   // if number is negative

   if (n < 0)

   {

        str="invalid input.";

   }

   // if number is positive

   else

   {

      int a=sqrt(n);

      // if number is perfect square

      if((a*a)==n)

      {

          str="True";

      }

      // if number is not perfect square

      else

      {

          str="False";

      }

   }

   // return the string

     return str;

}

// main function

int main()

{

   // variables

int n;

cout<<"enter the number:";

// read the value of n

cin>>n;

// call the function

string value=is_perfect(n);

// print the result

cout<<value<<endl;

return 0;

}

Explanation:

Read a number from user and assign it to variable "n".Then call the function is_perfect() with parameter n.First check whether number is negative or not. If number is negative then return a string "invalid input".If number is positive and perfect square then return a string "True" else return a string "False".

Output:

enter the number:-3

invalid input.

enter the number:5

False

enter the number:16

True

What is the period of a 2 KHz sine wave?

Answers

Answer:

Period of the given wave is 0.5 milliseconds.

Explanation:

We are given the frequency of the wave as 2 KHz

We know the relation between period and frequency of a wave is given by

[tex]Period=\frac{1}{frequency}[/tex]

Applying the given values we get

[tex]Period=\frac{1}{2\times 10^{3}}\\\\\therefore Period=0.5\times 10^{-3}seconds[/tex]

Thus period is 0.5 milliseconds.

How to determine if the function f(x) = x^2 + 3 from real numbers to real numbers is Injective, surjective, or bijective

Answers

Answer:

The function is not injective.

The function is not surjective.

The function is not bijective.

Explanation:

A function f(x) is injective if, and only if, [tex]a = b[/tex] when [tex]f(a) = f(b)[/tex].

So

[tex]f(x) = x^{2} + 3[/tex]

[tex]f(a) = f(b)[/tex]

[tex]a^{2} + 3 = b^{2} + 3[/tex]

[tex]a^{2} = b^{2}[/tex]

[tex]a = \pm b[/tex]

Since we may have [tex]f(a) = f(b)[/tex] when, for example, [tex]a = -b[/tex], the function is not injective.

A function f(x) is surjective, if, and only if, for each value of y, there is a value of x such that [tex]f(x) = y[/tex].

We have that y is composed of all the real numbers.

Here we have:

[tex]f(x) = y[/tex]

[tex]y = x^{2} + 3[/tex]

[tex]x^{2} = y - 3[/tex]

[tex]x = \sqrt{y-3}[/tex]

There is only a value of x such that [tex]f(x) = y[/tex] for [tex]y \geq 3[/tex]. So the function is not surjective.

A function f(x) is bijective when it is both injective and surjective. So this function is not bijective.

________ is when the sequence of instruction is guaranteed to execute as a group, or not execute at all, having no visible effect on system state.

Answers

Answer: Atomic operations

Explanation: Atomic operations are the process in which are related with the programs which execute in the independent manner and having no relation with other  processes or functions.

It is helpful operation in the parallel processing system.The operation assures about being carried out at rapid rate and do not face any deadlock during execution.This does not alter the rate of the system.

.Visual Studio .NET’s ___________ feature displays all the members in a class

a.real-time error checking

b.Quick Info

c.outlined code

d.Intellisense

Answers

Answer:d)Intellisense

Explanation: Visual Studio.NET is the tool for the development of the application .Intellisense is the type of code that is found in the Visual Studio.NET which is used for the intelligent completion of text or code. The factors present in the Visual studio NET has are tracking of the values, increasing the understanding of code,presenting the class member etc.

Other options are incorrect because real time error checking is for the checking of the error raising at the time of execution, Quick info is for gaining data rapidly and outlined code are for display of the hierarchical structure of codes.Thus, the correct option is option(d).

Name and describe the two (2) broad categories of files

Answers

If it’s computer files, that would be System Software and Application software.

“The System Software is the programs that allow the computer to function and access the functionality of the hardware. Systems software sole function is the control of the operation of the computer.

Applications software is the term used for programs that enable the user to achieve specific tasks such as create a document, use a database or produce a spreadsheet.”

What is the Multiple Items tool?

Answers

Explanation:

when a form is created in Microsoft Access using the form tool it displays a single record at a time.To display multiple records and the form should be more customizable then in this case we use Multiple Items tool.

Creating a form using Multiple Items Tool:-

In navigation pane click query or table which contains the data that we want to see on the form.

On create tab,in the group Forms,click more Forms,then click Multiple Items.

If the program does not handle an unchecked exception:

a.)
the program is halted and the default exception handler handles the exception

b.)
the program must handle the exception

c.)
the exception is ignored

d.)
this will cause a compilation error

Answers

Answer:a.) The program is halted and the default exception handler handles the exception

Explanation: If a exception is left out by the program handler then the processing is stopped and the control of exception handling is done to another handler. The unchecked exception is thus handled by the default exception handler.

Exception occur in the executing programs that try to stop the function by terminating it .The method used for the handling of the program is try catch and throw technique. Unchecked exception are found while the run-time and thus target the processing of the program.Thus,the correct option is option(a).

Other options are incorrect because the current program cannot handle the exception as it has left it unchecked, exception cannot be ignored because it stops the program and compilation error will not be caused.

What are design classes? (Points : 6) Design classes are classes whose specifications have been completed to such a degree that they can be implemented.
Design classes are classes whose specifications have been completed to such a degree that they can be programmed.
Design classes are classes whose specifications have been completed to such a degree that they can be approved.
None of these

Answers

Answer: implemented

Explanation:I used a bit of deductive logic. Design would be something with parameters and or boundaries like designing a home. Programmed just didn’t seem to fit in because there is no room for creative thinking. Approved? By whom?, you design something to reach a goal and follow to a degree what you designed, maybe within the walls you can add a closet or with design classes they are designed for a purpose but there must be ideas within a design that come up. So implemented makes sense so you have a design that seems to fit and certainly can be implemented meaning it can be used for a purpose to teach or help.

What is the output of the code below?

for (int j = 1; j <= 10; j++)

{

if (j == 3)

{

break;

}

cout << j << endl;

}

Output:

for (int j = 1; j <= 10; j++)

{

if (j == 3)

{

continue;

}

cout << j << endl;

}

Output:

Expert

Answers

Answer:

The first output for the following code is  given below :

1

2

The second output for the following code is given below

1

2

4

5

6

7

8

9

10

Explanation:

In the first code the loop will  iterated

When j=1 the condition of if block will not be executed  so it print 1 on console and increment the value of j.

After increment of j it becomes 2 again if block does not executed  because the condition of  if block is not  true so it print 2 on console and increased the value of j.

When j=3 if condition block is executed and   it terminate the loop immediately .

Therefore output is :

1

2

In the second code the loop will iterate

When j=1 the condition of if block is not executed  so it print 1 on console and increment the value of j.

After increment the value of j it becomes  2 .Again if block will not be executed  so it print 2 on console and increased the value of j.

After increment the value of j becomes 3.This time if block will  executed  ,it will moved directly control to the beginning of the loop and  skip the current  execution of statements that means it skip the value j=3 and increment the value of j .

Now j=4 this process is same follow untill  when j<=10 when j=11 the loop is false and loop will terminate .

Therefore output is :

1

2

4

5

6

7

8

9

10

Which of the following functions is NOT performed at layer 6 of the OSI model? (Please select one of the four options)

Routing of the message

Encryption

Compression

Converting the message to a format that is understood by the destination

Answers

Answer:  The function that is NOT performed at the layer 6 of the OSI model from the options presented, is the first one: Routing of the message.

Explanation:

In the OSI model, Layer 6 is called the Presentation Layer, and is basically responsible of taking the message forwarded by one Application Layer protocol (like HTTP) and formatting it a way that can be uniquely decoded at his intended destination.

This processes can include Encryption and Compression, among others.

So, Layer 6 is not responsible for routing the message (this is a function of the Layer 3, the Network Layer).

What is memory paging, and how can it facilitate virtual memory?

Answers

Answer:

Memory paging is a memory management technique that controls how memory resources are used and shared by the operating system.

The virtual memory is an alternate set of memory addresses that operating systems in conjunction with the hardware reserve to expand the total amount of addresses(real memory + virtual memory). When the program is actually executed, the virtual addresses are converted into real memory addresses.

The operating system divides virtual memory into pages to facilitate copying virtual memory into real memory, each of which contains a fixed number of addresses. When the page is needed, the operating system copies it from disk(virtual memory) to the main memory(real memory), translating the virtual addresses into real addresses.

Why do we have some network devices that have more than one IP address?

Answers

Answer:

This is because a device can have more than a network interface.

Explanation:

IP address has to be unique in a network but a device can have more than a network interface. This is because the device has multiple network cards and for each of the interfaces we can set up an unique ip address in a LAN. For example almost all laptops have at least two network interfaces: one is the ethernet interface, we can connect an ethernet cable to this interface. The other one is the WiFi interface, we can connect to internet using this interface.  In this case we can have more than one IP address but they have to be unique.

Write a program that inputs a series of 10 non-negative numbers and determines and prints the largest of those numbers. Your program should use three variables: Counter - a counter to count to 10 (i.e. to keep track of how many numbers have been input and to determine when all 10 number have been processed) Number - the current number input to the program Largest - the largest number found so far

Answers

Answer:

// here is code in C++.

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{  

// variables

   int Counter,largest=-1,Number;

   cout<<"enter 10 non-negative numbers:";

   // read 10 non-negative Numbers

   for(Counter=1;Counter<=10;Counter++)

   {

       cin>>Number;

       if entered number is largest so far

       if(Number>largest)

       {

       // update the largest

           largest=Number;

           // print the largest

           cout<<"largest found so far is: "<<largest<<endl;

       }

   }

return 0;

}

Explanation:

Declare variables Counter,Number and largest=-1.Here Counter is use to keep  count of input number.largest to store the largest input so far.And Number  to read inout from user.Find and print largest after each input.

Output:

enter 10 non-negative numbers:24                                                                                                                              

largest found so far is: 24                                                                                                                                  

12                                                                                                                                                            

56                                                                                                                                                            

largest found so far is: 56                                                                                                                                  

9                                                                                                                                                            

8                                                                                                                                                            

67                                                                                                                                                            

largest found so far is: 67                                                                                                                                  

33                                                                                                                                                            

56                                                                                                                                                            

98                                                                                                                                                            

largest found so far is: 98                                                                                                                                  

100                                                                                                                                                          

largest found so far is: 100

. How does Word indicate a possible instances of inconsistent formatting?: *
a. With a wavy red underline
b. With a wavy blue underline
c. With a wavy green underline
d. This functionality is not available in Word

Answers

Answer:b)With a wavy blue underline

Explanation:Wavy blue lines in the Word document is for representing that the Format consistency checker is in working/on mode .It can identify the inconsistent format instances for the correction while the user is writing the text.

Other options are incorrect because wavy red line is for incorrect spelling of any word and wavy green line signifies the grammatical mistake .The function is available for the format inconsistency as wavy blue line in Word .Thus, the correct option is option(b).

Which of the following keywords is used to remove a row in a table? (Points : 2) DROP
DELETE
REMOVE
MODIFY

Answers

Answer:

DELETE

Explanation:

DELETE keyword is used to remove a row in a table. The actual syntax is as follows:

DELETE from <TableName> where <Condition>;

For example:

DELETE FROM employee where name='Peter';

This will remove employee with the name Peter from the Employee table.

DROP on the other hand is used to delete the entire table without focussing on a particular row.DROP syntax is as follows:

DROP TABLE <TableName>;

___ should be considered by managers to ensure that newer hardware is compatible with older hardware.
Backward compatibility
Forward compatibility
Integrative compatibility
Reverse compatibility

Answers

Answer:

Backward Compatibility

Explanation:

Backward Compatibility means either the Software or Hardware systems which are compatible with the older versions of the software and hardware.It basically means the newer versions of the software or hardware are compatible with the older versions of the same software or hardware.The core technology in both the newer versions and hardware may remain the same. The newer versions uses the same data and technology of the older versions with some upgrades.So, option (A) is correct option.Forward Compatibility is related to the same concept. Forward Compatibility means the older versions of the software and hardware are compatible with the upcoming newer versions of software and hardware. So, option (B) Is wrong option.There are no terms called (C) Integrative Compatibility (D) Reverse compatibility. So, options (C) and (D) are false.

A host is rebooted and you view the IP address that it was assigned. The address is 169.254.141.45. Which of the following happened? (Please select one of the four options)

The host received an APIPA address

The host received a public address

The host receive a multicast address

The host received a private address

Answers

Answer:  The host received an APIPA address

Explanation:

The IP address 169.254.141.45 is within the range of IP address between 169.254.0.0 and 169.254.255.255, which are reserved by the IANA (Internet Assigned Numbers Authority) for those IP addresses denoted as APIPA addresses, where APIPA stands for Automatic Private IP Address.

This means that any IP Address in this range , will be not be in conflict with routable IP addresses.

If variable x has value 2 and y has value 1, which values could result from the following Jack expression?

x + 3 * 4 - y

Answers

Answer:

The result of the given expression is 13.

Explanation:

Here x and y are the two variable which has value 2 and 1 respectively.

x+3*4-y

Here  operator *  is more precedence then that + operator so

=2+(3*4)-1

2+12-1 now + operator  is more precedence then that - operator so

=(2+12)-1

=(14-1)

=13

Following are the program in C language

#include <stdio.h>// header file

int main() // main function

{

   int x=2,y=1; // variable declaration

   printf("%d",x+3*4-1); b// final result

return 0;

}

Output:13

Which of the following commands contains an error?

Question 2 options:

CREATE vehicletype (carid INTEGER PRIMARY KEY, typeofvehicle TEXT, manufacturer TEXT, year INTEGER);

INSERT INTO vehicletype VALUES (1,"truck","Ford",2000);

SELECT * FROM vehicletype;

Answers

Answer:

The very first command contains an error.

Explanation:

The create query is used to create the table in the database. The syntax of the create query is :

create table tablename(column1 datatype,column2 datatype ........columnn datatype);

So there is a keyword table is missing in the given query. so it is incorrect query.

INSERT INTO vehicletype VALUES (1,"truck","Ford",2000); This query is correct.

SELECT * FROM vehicletype; This query is also correct.

The frequency of a sine wave is defined as:

a.the number of cycles per second

b.the maximum amplitude of the wave

c.the time for one cycle

d.the difference between the high frequency and the low frequency

Answers

Answer:

a.the number of cycles per second

Explanation:

The frequency of a sine wave is defined as the number of cycles per second.

Frequency is the inverse of the time period. The frequency of a sine wave is given by 1/TimePeriod . It is generally expressed in units of Hertz(Hz) or sec^-1. Larger the time period, lower will be the frequency and vice versa. So for higher frequency waves we need to ensure that the time period is small.

Write a recursive function that returns the number of 1 in the binary representation of N. Use the fact that this is equal to the number of 1 in the representation of N/2, plus 1, if N is odd.

Answers

Answer:

#here is code in python

# recursive function that counts the number of 1's

def bin_count(num):

   #base condition

   if num==0:

       return (0)

   elif num == 1:

       return (1)

   else:

       #recursive call

       return bin_count(num//2)+bin_count(num%2)

#read a number

num=int(input("enter a number:"))

#call the function

print("number of 1's is:",bin_count(num))

Explanation:

Read a number from user and call the function bin_count() with parameter num. In the function, if num=0 then it will return 0.If num is 1 then return 1 else it will count the number of 1's inn the binary representation of the number and return the count.

Output:

enter a number:63

number of 1's is: 6

What is a 'balanced' dfd?

Answers

Answer:

 The balanced DFD (Data flow diagram) is the concept of the balancing all the state and incoming and also outgoing flow in the system.

The balanced data flow diagram basically ensure that the output and input data flow maintain the consistency in the DFD and are properly aligned the flow of data.

A balanced DFD does not include any type of flowchart in the control statement and also does not contain any crossing lines.

Answer:

It is how you place an input then you get an output of a graphic

Explanation:

write a program that reads in initial saving value ( $100 ) and interest rate (use .12 = 12%) per year and then figures out how much will be in the account after 4 months and prints results.

Answers

Answer:

// here is program in C++.

// include header

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

  // variables

   float ini_sav;

   float i_rate;

   cout<<"Enter the initial saving:";

// read initial saving

   cin>>ini_sav;

   cout<<"Enter interest rate:";

// read interest rate

   cin>>i_rate;

// account after 4 months

   float account=ini_sav+ini_sav*i_rate*(4/float(12));

// print account

   cout<<"Account after 4 months:"<<account<<endl;

return 0;

}

Explanation:

Read initial saving from user and assign it to "ini_sav".Then read interest rate and assign to "i_rate".Then calculate the interest on initial saving after 4 months as "ini_sav*i_rate*(4/float(12))" and to initial saving.This will be the account after 4 months.

Output:

Enter the initial saving:100

Enter interest rate:.12

Account after 4 months:104

. assures that individuals control or influence what information related to them may be collected and stored and by whom and to whom that information may be disclosed. A. Availability B. System Integrity . Privacy D. Data Integrity

Answers

Answer: Privacy  

Explanation: Privacy is defined as information or content that is kept to the selected or desired resources and people.It is like a boundary after which the information should not be shared or disclosed because of the privates reasons such as insecurity , protection etc.It is followed for confidential and sensitive content to remain secure and cannot be misused.

Other options are incorrect because availability is referred serviceability of data, system integrity is assuring no unauthorized action in system for modification and data integrity assures about the safeness and reality of information without manipulation .Thus, the correct option is privacy.

In Mandatory Access Control sensitivity labels attached to object contain what information?

a.The item’s classification

b.The item’s classification and category set

c.The item’s category

d.The item’s need to know

Answers

Answer:b)The item’s classification and category set

Explanation: Mandatory access control(MAC) is the security component in the computer system. It is regarding the controlling the access of the operating system by the administrator.The accessing is made limited by the MAC according to the sensitivity of the data .

The authorization for user to access the system is based on this sensitivity level known sensitivity label. The objects contain the information regarding the classification and categories or level of items. Thus, the correct option is option(b).

Other Questions
What is one of the lessons about the natural world taught in "The Blackfeet Genesis"?a. Living things are distributed randomly over theearth.b. People who die will be missed by their families.c. lAnimals live in the habitat they are suited for.d. A woman and child were the first humans. Given f(x)=2x-1find the domain value if the range value is 4. This bacterium is sometimes called "flesh eating bacteria."A) Proteus vulgarisB) Clostridium tetaniC) Staphylococcus epidermisD) Streptococcus pyogenes X : 6 = 10 : 150 X = What does X equal? can someone help me with all this?? i really dont get it How are old blood cells removed from the circulation? How are the various components of the red blood cell disposed of? A piece of glass of index of refraction 1.50 is coated with a thin layer of magnesium fluoride of index of refraction 1.38. It is illuminated with light of wavelength 680 nm. Determine the minimum thickness of the coating that will result in no reflection ____ coordinates activities related to the Internets naming system, such as IP address allocation and domain name management. National Center for Supercomputing Applications (NCSA) Web Consortium (W3C) ICANN (Internet Corporation for Assigned Names and Numbers) Internet Society (ISOC) Address You, a fancy dress manufacturer, sold a dress for $8,000 on credit. The cost of producing this dress was $1,000. First, how would the revenue and receivable from this transaction impact the accounting equation of Address You? Please enter the amounts in the boxes below. Which one of the following is true concerning retinoblastoma protein and the transcription factor E2F?a. E2F phosphorylates Rbb. E2F binds phosphorylated Rbc. E2F is phosphorylated by Rbd. E2F binds unphosphorylated Rb The function of ______ is to transfer control to a user command-line interpreter, which gives access to any program available on the system with the privileges of the attacked program. stretch by 1/3, shift up 4 and left 5 This new form of entertainment was demeaning to African Americans because the performers colored their faces black.a.circusesc.minstrel showsb.vaudevilled.burlesquePlease select the best answer from the choices providedABCD A particle moves with a constant speed of 6 m/s along a circular path of a radius of 4 m. What is the magnitude of its acceleration. Do not include units in your answer, assumed unit are m/s2. A chemist is doing research to find a better way to process natural gas after it is removed from the ground. Which branch of chemistry best describes this chemist's work?A: organic chemistry B: inorganic chemistry C: biochemistry D: physical chemistry Which type of medical checkups are necessary to determine if a childs growth and development are on track?(BLANK) medical checkups are necessary to determine if a childs growth and development are on track. Which of the following is a limit of science? The technology or tools available to test scientific claims The number of times an experiment can be repeated The total number of scientists in a field, like physics or chemistry The use of critical thinking and evidence to study phenomena The question of how someone's personality traits can be explained by unfulfilled wishes and childhood traumas would be of MOST interest to a psychologist working from a(n) _____ perspective. What is the solution to the set inequality (4x-3)(2x-1) Please help me! I dont understand these problems