0
What will be the answer of the question?
String ____ Country____"USA"_____
10 odpowiedzi
+ 6
What exactly is the question?
+ 5
Read the lesson again and look for a code example that is similar to the one in the task.
+ 3
Anchal Verma So ask a question about it. Just seeing the blanks and no context gives zero clue about what's being asked.
But pls do not ask for the final answer to the assignment. Fullfilling them is part of the lesson. Ask for information instead.
+ 2
Well, here's what we can infer:
Line 1: that's gonna be the name of a String variable, obviously. Missing a ; as well, so we can be confident that you're not copying things correctly lol. This sounds flippant, but turns out to be important, because...
Line 2: normally a capitalized variable name would be a class name, but since we've already established that you weren't careful about copying things, I'd guess this line is supposed to be assigning a value to the previously declared string variable. This line therefore gives us the string name for line 1, and this time the missing ; might indeed be part of the question.
So that gives us all the information we need to fill in the blanks. Hopefully that helped.
+ 1
It is fill in the blanks
+ 1
I guess you have to declare string variable read your question again and give more details about it
+ 1
Anchal Verma
here's your free answer:
string country;
country = "USA";
But I would also suggest to restart the course and your mindset.
Programming requires attention to detail and thorough understanding of the concepts and syntax.
The first line is variable declaration.
country is declared as a string variable.
The second line is variable assignment.
USA is assigned as the value to the country variable.
= is used to indicate assignment.
; is used to terminate every statement in c++.
Two lines of codes packed a lot of basic ideas and you're going to use this knowledge over and over again in the future.
The fact where you ended up essentially guessing meant you did not really learn the previous lesson.
Go slower and test yourself repeatedly. A solid foundation is what you want.
0
I have tried many a times but it was showing wrong answer
0
PS: the blank spaces are usually the correct size, so I'd wager the actual question looked like this:
String _______;
country _ "USA" _
0
Orin Cook Bravo! 👏