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
GalinKa [24]
3 years ago
9

" Is there any difference between subprogram, functions , methods , subroutines and procedures in C/C++?

Arts
2 answers:
Simora [160]3 years ago
6 0
Yes there is a difference.  <span />
skelet666 [1.2K]3 years ago
5 0
Well let me explain this to you in a better way. The terms 'subprogram', 'function' and 'method' have all the same meaning in C/C++ but we usually called them functions, and we divide the functions into two types :
1)Function : it's the usual one, as we all know, it returns a value.
  2) General format :
  Type function_name(<arguments>){
               // Your work
               return <value/variable> //Note : the type must be the same as the function
                                                    // type. }
      Example : int Maheen(int a, int b){
             int c = a + b;
            return c;
        }
 Procedure : it's a function but it doesn't return any value, it begins with 'void'.

General format :
       void function_name(<arguments>){
               // Your work
               //Note : There is no return here.
       }
       
Example :
       void Maheen(int a, int b){
             int c = a + b;
            printf("The sum is : %d", c);
        }

I think this can help you greatly
<span>
</span>
You might be interested in
[Verse]
Archy [21]

Explanation:

4.1 The Chemical Equation

LEARNING OBJECTIVES

Define chemical equation.

Identify the parts of a chemical equation.

A chemical reaction expresses a chemical change. For example, one chemical property of hydrogen is that it will react with oxygen to make water. We can write that as follows:

hydrogen reacts with oxygen to make water

We can represent this chemical change more succinctly as

hydrogen + oxygen → water

where the + sign means that the two substances interact chemically with each other and the → symbol implies that a chemical reaction takes place. But substances can also be represented by chemical formulas. Remembering that hydrogen and oxygen both exist as diatomic molecules, we can rewrite our chemical change as

H2 + O2 → H2O

This is an example of a chemical equation, which is a concise way of representing a chemical reaction. The initial substances are called reactants, and the final substances are called products.

Unfortunately, it is also an incomplete chemical equation. The law of conservation of matter says that matter cannot be created or destroyed. In chemical equations, the number of atoms of each element in the reactants must be the same as the number of atoms of each element in the products. If we count the number of hydrogen atoms in the reactants and products, we find two hydrogen atoms. But if we count the number of oxygen atoms in the reactants and products, we find that there are two oxygen atoms in the reactants but only one oxygen atom in the products.

What can we do? Can we change the subscripts in the formula for water so that it has two oxygen atoms in it? No; you cannot change the formulas of individual substances because the chemical formula for a given substance is characteristic of that substance. What you can do, however, is to change the number of molecules that react or are produced. We do this one element at a time, going from one side of the reaction to the other, changing the number of molecules of a substance until all elements have the same number of atoms on each side.

To accommodate the two oxygen atoms as reactants, let us assume that we have two water molecules as products:

H2 + O2 → 2H2O

The 2 in front of the formula for water is called a coefficient. Now there is the same number of oxygen atoms in the reactants as there are in the product. But in satisfying the need for the same number of oxygen atoms on both sides of the reaction, we have also changed the number of hydrogen atoms on the product side, so the number of hydrogen atoms is no longer equal. No problem—simply go back to the reactant side of the equation and add a coefficient in front of the H2. The coefficient that works is 2:

2H2 + O2 → 2H2O

There are now four hydrogen atoms in the reactants and also four atoms of hydrogen in the product. There are two oxygen atoms in the reactants and two atoms of oxygen in the product. The law of conservation of matter has been satisfied. When the reactants and products of a chemical equation have the same number of atoms of all elements present, we say that an equation is balanced. All proper chemical equations are balanced. If a substance does not have a coefficient written in front of it, it is assumed to be 1. Also, the convention is to use all whole numbers when balancing chemical equations. This sometimes makes us do a bit more “back and forth” work when balancing a chemical equation.

8 0
3 years ago
(Just be my friend)<br> FOR your sake​
nata0808 [166]

Explanation:

(Just be my friend)

FOR your sake

ok I will be

real not fake .

hope it is helpful to you

7 0
3 years ago
Read 2 more answers
Would you rather go on a date with the popular (mean) bad boy in your school, or the slobby nice, nerdy nerd? BRAINLIEST!!!
Law Incorporation [45]

Answer:

Nice nerdy guy

Here is why:

A nerdy guy may be good at playing games, but they're no player lol. When you're dating a nerd, you can be as secure in your relationship as a secure server because your nerd appreciates what a great thing they've got going with you, and they really appreciates you for who you are.

6 0
3 years ago
Which musical style was a twentieth-century trend, particularly current in the period between the two World Wars, in which compo
scoray [572]

Answer:

neoclassicism is the answer.

Explanation:

6 0
3 years ago
A tenor saxophonist, he was one of the leading horn players who developed the hard bop style. The 1956 recording of his piece "P
geniusboy [140]
Sonny rollins is the musician
7 0
3 years ago
Other questions:
  • What is the simultaneous uses of a multiple keys called
    14·2 answers
  • Where is mayan art from?
    10·2 answers
  • N which country did the gothic style first emerge?
    5·1 answer
  • Write a short monologue on the following scenarios 1 ) You are getting ready to go out to a party you are in a hurry . ( what wo
    11·1 answer
  • Of the Romans "group of three" gods in the Archaic Triad, which one did not have a Greek counterpart?
    12·2 answers
  • BTS fanart! how did i do? what do i need to do to make them better?<br> their not finished (some)
    9·1 answer
  • Does this makeup look good i need sum feed back be honest
    13·2 answers
  • mention four reasons why it is important to apply for entry at tertiary institutions while you are still at grade 10​
    10·2 answers
  • Can somebody please help i bon't have much time left please help!!!nahahahahahah
    10·2 answers
  • From the top of the head to the sole of the feet; which part of the body falls half way?
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!