Thursday, December 3, 2009

C + + is a powerful programming language to create a program. C + + is a high level language which is the development of C language, where language is a programming language objects berorentasi

What is the program? How do I create one? If you've made, what's the point? Perhaps that is the question - a question of people - just people who know computers. Such a program is problem-solving methods provided in the computer for use by humans in facilitating the work / activities. That's less than understanding the program, at least in my opinion. So, how to make it? Making the program is to give "orders" to the computer in such a way that "created" the program is then stored in computer memory. Then, what is "commanded" on the computer so the program can be formed? No one thought that he must tell the computer: "Make me a good program that would used for my company accounts.", Right? We, of course, must "talk" with computers in a language he could understand. Language is that? There are many many programming languages to translate the logic of programming instructions that can be understood by the computer, and then run (and in this case to make the program). Command is run by a computer in a program that to make then be used by people / stakeholders.

C + + is a powerful programming language to create a program. C + + is a high level language which is the development of C language, where language is a programming language objects berorentasi (unlike his predecessor, C). Say medium because this language is between high-level language and low. High level language is a language more "manusawi", because the command - the command of this language is more oriented to human language. Visual Basic (VB) and Pascal are two of several examples of high-level languages. While low-level language is more oriented language to machine language so that language is not very "humane".

Writing in C + + is case sensitive. Which means, C + + distinguish between small and capital letters. Which means (again): variabel_pertama not the same as variabel_Pertama or mboknya_echi not the same as mboknya_Echi.

Comments in C + + written with '/ /' for a long comment with a line or '/ *' and '* /' to comment more than one line, where the sign / * is the "opening" of comments and * / is a "cover" comment. Cataatan ang comment was written by a programmer for a reminder or explanation when reading a code. Words - words in a comment will not be executed by the compiler.

Some mistakes in writing in C + + is:
  • int int; / * one because the name of a variable should not be the same as seuah data types (int) * /
  • int Jam_9; / / false because the variable names begin with capital letters
  • int 90jam; / * well, this is also wrong because the name of a variable can not start with numbers * /
Writing is true in C + + is:
  • int Myint; / / true
  • char kata_2; / / that's right ...
  • double bilangan_KeDuA; / * if name identifiernya strange, but it is also true:) * /
Every statement in C + + should be marked ';' at the end of the statement. Example of a correct statement written in C + + is:

int a, b, c;
a = 1;
b = 2;
c = a + b;
While writing the wrong is:

int a, b, c
because it is considered an error by the compiler, because it is an incomplete statement.
Type - the type of data is known in C + + are as follows:

    * Int
      int is an integer data type (integer). Examples of the use of type int is:
      int a = 1;
      int num1 = 2, num2 = 4;
      Note that the value - the value entered in the assign (enter) into a variable - a variable of type int is a number - number / integer. Like its name, int value can only be round and not fractions (decimals). What if the type int and that included the results of the division that is not round results? Then:
      int hasil_bagi_bulat = 5 / 2;
      The result: 2
      This is because 5 divided by 2 = 2.5 and then because hasil_bagi_bulat is an integer (whole number) 2.5 and then rounded to 2.
      To own a decimal to a certain type of these numbers.
    * Double
      is a special type that are not round numbers, aka decimal / fraction. Example usage is:
      double mydouble = 5:00;
      double pecahan_pertama = 2.5, pecahan_kedua = 9.9;
    * Char
      is a character data type can store starting from: a - z, A - Z, '!', '@', etc.. Penggunannya ± equal to the type - the type that previously:
      char letter = 'c';
      inisial1 char = 'A', inisial2 = 'W';
      char symbol = '#';
    * Bool
      is the type who just "hold" value "true" and "wrong" that is, true and false (boolean). Example:
      benar_atau_salah bool = true;
    * String
      is a special type to accommodate all the input from the user / character combination is very long. For example:
      string string_gue = "nah, kyk gini deh example string ...";
    * Arithmetic operators used in C ++ is:
      • '+' = sum
      • '-' = reduction
      • '*' = multiplication
      • '/' = division
      • '%' = remainder of (Modulo)

No comments:

Post a Comment