View Question
Q: Definition and Meaning of C++ Items ( Answered ,   2 Comments )
 Question
 Subject: Definition and Meaning of C++ Items Category: Computers > Programming Asked by: doylexx-ga List Price: \$20.00 Posted: 21 Apr 2006 08:58 PDT Expires: 21 May 2006 08:58 PDT Question ID: 721343
 (In C++ Programming define the below bullets and their meaning: What is int i, j; What is char c: What is float x i=4 j=i+7; x=9.087 x=x*12.3 std::cin>> integer1; cout<
 Subject: Re: Definition and Meaning of C++ Items Answered By: hammer-ga on 21 Apr 2006 18:15 PDT Rated:
 Doylexx, Below is an explantion of each point you list in your question. [[ What is int i, j; ]] Declares two variables named i and j, both of type int (Integer). [[ What is char c: ]] Declares a variable named c of type char, which holds a single character. [[ What is float x ]] Declares a variable named x of type float (floating point number). [[ i=4 ]] Assigns the value 4 to the variable named i. [[ j=i+7; ]] Assigns the current value of the variable named i plus 7 to the variable called j. For example, if the current value of i is 4, then j would equal 11 after this line runs. [[ x=9.087 ]] Assigns the value 9.087 to the variable named x. [[ x=x*12.3 ]] Multiplies the current value of the variable named x by 12.3 and assigns the result back to the variable called x. [[ std::cin>> integer1; ]] Uses the stream extraction operator (>>) to place the value typed by the user in a variable named integer1. std::cin means standard input. [[ cout<
 doylexx-ga rated this answer: Exactly what I needed! Many thanks!