Random Test =D
I've been reading through a book, and so far I've started to skim the surface of C++.
I decided to start keeping a few notes, so I could refer back to them, and in return, I would answer them.
Almost like Cornell Notes. Anyways, I wanted to post the questions and answers on here:
1.) So the people who actually know, can check if they're right
2.) SO people who don't know, can see if they know the answers![=]](/forum/images/emotions/=].gif)
I'll post the questions at the top, and the answers I got, at the bottom.
I figure this might be a lil' fun, and a change from all the help topics x)
Questions:
1.) What is used compile .cpp files using the Visual Studio Command Prompt?:
2.) How do you start a function?: (Not sure if you would call it a source, or what you would call it, but I understand what I mean xP )
3.) How do you end a function?:
4.) How would you use the header iostream?:
5.) How would you declare the variable 'length'?:
6.) How do you declare more than one variable without starting a new line?:
7.) What does cout stand for?:
8.) What does cin stand for?:
9.) What is the << operator, and what does it do?:
10.) What is the >> operator, and what does it do?:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Answers:
1.) C:\...>cl -GX Sample.cpp
2.) int main()
3.) return 0;
4.) #include <iostream>
5.) int length;
6.) int length, width;
7.) Console Output(Mainly writing something on the computer screen)
8.) Console Input(linked to the keyboard by default, can be linked to other input sources)
9.) << is the output operator, it processes inputted data and gives an output
10.) >> is the input operator, it inputs data into the program to be processed
If my answers are wrong, please lemme know x)
I decided to start keeping a few notes, so I could refer back to them, and in return, I would answer them.
Almost like Cornell Notes. Anyways, I wanted to post the questions and answers on here:
1.) So the people who actually know, can check if they're right
2.) SO people who don't know, can see if they know the answers
![=]](/forum/images/emotions/=].gif)
I'll post the questions at the top, and the answers I got, at the bottom.
I figure this might be a lil' fun, and a change from all the help topics x)
Questions:
1.) What is used compile .cpp files using the Visual Studio Command Prompt?:
2.) How do you start a function?: (Not sure if you would call it a source, or what you would call it, but I understand what I mean xP )
3.) How do you end a function?:
4.) How would you use the header iostream?:
5.) How would you declare the variable 'length'?:
6.) How do you declare more than one variable without starting a new line?:
7.) What does cout stand for?:
8.) What does cin stand for?:
9.) What is the << operator, and what does it do?:
10.) What is the >> operator, and what does it do?:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Answers:
1.) C:\...>cl -GX Sample.cpp
2.) int main()
3.) return 0;
4.) #include <iostream>
5.) int length;
6.) int length, width;
7.) Console Output(Mainly writing something on the computer screen)
8.) Console Input(linked to the keyboard by default, can be linked to other input sources)
9.) << is the output operator, it processes inputted data and gives an output
10.) >> is the input operator, it inputs data into the program to be processed
If my answers are wrong, please lemme know x)

keep going.

good luck