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
mariarad [96]
3 years ago
12

What are the purpose of each in c++?

Computers and Technology
1 answer:
34kurt3 years ago
6 0

<u>If statements</u>- This statement is used to check the condition.

    if(condition)

      {

        statement

     }

If the condition is true,then statement will run,else not.

<u>Switch statement</u>-This statement is used for long conditions.It is a substitute for if,else conditions

     switch(a)

       {

          case1: statement 1//if a=1

                      break;

          case2: statement 2 //if a=2

                       break;

         .....

          default:statement//if a is not equal to any of the cases.

<u>Multiway if</u>-In this statement ,if elseif and else were there.

    if(condition1)

       {

         statement 1

       }

   elseif(condition2)

       {

         statement 2

      }

..............

   else

       {

         statement n

       }

<u>Nested loops</u>-This statements are used when we use if-else conditions in other if,else conditions.

   if(condition 1)

     {

       if(condition 2)

          {

           if (condition 3)

              {

               statement 3

              }

          else

               {

                 statement 4

               }

           }

      ]

<u>rand()</u>-This method is used for generating random number.The expression is

     number=rand()%50;

It will generate a random number ranges between  0 to 50.

<u>srand()</u>-This method is used to set the starting value for random number series.

srand (time(NULL));

<u>seed()</u>-It is a method for initializing the same random series,it is passed in srand().

You might be interested in
What type of ransomware was developed to block the user from accessing the computer and encrypts all the files on the user's dev
Mamont248 [21]

Answer: A. CRYPTO-MALWARE

Explanation: Crypto-malware is a type of ransomware that blocks the uses from accessing the computer system,it also encripts all the files.

This type of ransomware is mainly used to demand for ransom.

This type of ransomware which makes use of sophisticated and advanced ransomware technology to ensure that encripting must be with a unique Key or password,the hijacked system is used for crypto mining without the owns consent.

7 0
3 years ago
Read 2 more answers
A disk has 4000 cylinders, each with 8 tracks of 512 blocks. A seek takes 1 msec per cylinder moved. If no attempt is made to pu
shutvik [7]

Answer:

The answer is below

Explanation:

a)

If the blocks of a file are not put together, that is for nonadjacent block of files to each other, the time (t) taken to read a 100 block file is:

t = (average seek + rotational latency + transfer time) * 100 block

Average seek = 5 msec, rotational latency = 10 msec and transfer time = 20 microsec = 0.02 msec

t = (5 + 10 + 0.02) * 100 = 1502 msec

b)

If the blocks of a file are put together, that is for adjacent block of files to each other, the time (t) taken to read a 100 block file is:

t = (seek time * mean interblock distance + rotational latency + transfer time) * 100 block

seek time = 100 microsec = 0.1 msec, rotational latency = 10 msec and transfer time = 20 microsec = 0.02 msec, mean interblock distance = 2 cylinders

t = (0.1*2 + 10 + 0.02) * 100 = 1022 msec

3 0
3 years ago
Subana is writing a program which will calculate the mean average of a set of numbers by adding the numbers and dividing the res
marysya [2.9K]

Answer:

Data Type: Double (decimal)

Variable Name: avg

Explanation:

An average of numbers will typically give you a decimal answer. Therefore, you should use the Double data type.

8 0
3 years ago
Read 2 more answers
Two Technicians are discussing ShopKey Pro. Technician
Vlada [557]

Answer:

Technician A is correct

Explanation:

Contact us is the most common term used in online applications such as in websites, mobile/android application to search contact information. People mostly scanning the “contact us” page to find the contact information, if they want to contact the company or organization.

Why technician A is correct.

Technician A is correct because people always try to find the “Contact us” page to find contact information for asking questions, to provide feedback, or any suggestion if they want to provide. It is hard for people to find contact information to provide feedback or give an idea to improve the ShopKey version in “support” heading under the “help” section. Because people are more inclined to search such information in the “Contact us” page rather than exploring the website to find such contact.

Why technical B is not correct

When people want to provide feedback, ask a question or suggest a new idea, they mostly prefer to search for information in the contact us pages. An ordinary user, who has no knowledge of website management or website hierarchy, search contact information in the “Contact us” page rather than searching in support or in the help section.

3 0
3 years ago
Which function can you use to abbreviate the lengthy expression, A1+A2+A3+A3...+A19+A20?  MAX COUNT SUM ROUND
Naddika [18.5K]
Which function can you use to abbreviate the lengthy expression, A1+A2+A3+A3...+A19+A20? SUM
6 0
4 years ago
Read 2 more answers
Other questions:
  • What do file extensions tell you about a particular file? Why can a file have only one type of file extension?
    12·1 answer
  • Which pane displays commands that change relative to the activity taking place in the presentation window's main work area?
    11·2 answers
  • Motivation is best defined as
    9·2 answers
  • Minerals can form deep inside Earth’s crust by
    13·1 answer
  • when you type a day, month, or date, what features does Word use to automatically complete typing the day, month, or date for yo
    6·1 answer
  • Gigantic Life Insurance is organized as a single domain. The network manager is concerned that dividing into multiple domains to
    15·1 answer
  • . The NFiPA 704 system uses a numerical value between _____ and _____ to indicate the level of hazard for that particular chemic
    7·1 answer
  • What does pdf stand for?
    10·1 answer
  • Consider the key success factors of B2C. Is it only IT? What is most important?​
    8·1 answer
  • Topic: Video Games.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!