Hello, the school gave me homework It's my first time with C++. I'm asking you a question because you gave me this homework after the first hour of C++ <
1. Which PD is needed when using the format used with the std cout printing st 2. Which form allows short name cout endl to be used instead of std- 3.What is the name of the building? 4. What is the name of the seedling program? 5. What symbols (symbols) are closely related to the main elements? 6. Which implementation is directly related to the information in the st-
So here's the rough interpretation. If you tell me, I think it'll be refreshing. <
c++ endl
I might be wrong because I'm just getting started, but I think it's relatively easy.
Which preprocessor indicator is required to use the command of an output stream object named std::cout?
I think I'm talking about iostream.
Which command (or reserved word) allows std:: to be omitted?
using namesapce std;
What does std mean?
standard
What is the name of the function that all c++ programs have?
main()
What symbol is the main body surrounded by?
int main(void) { }
So I think it's {}..
What is the operation indicator for using the std::cout output stream?
<<
Write a c++ program that prints your name on the console window.
#include <iostream>
using namespace std;
int main(void)
{
cout<<"your name";
return 0;
}
Write a c++ program that prints your first and last names in the console window, but let your first and last names appear in one line and then the next.
#include <iostream>
using namespace std;
int main(void)
{
cout<<"your first name";
cout<<endl;
cout<<"your last name";
cout<<endl; // a new line to look clean
return 0;
}
That's it. These are very basic questions, so it's not that difficult. Please understand while looking for the textbook.
© 2024 OneMinuteCode. All rights reserved.