1.

What do you understand by Golang string literals?

Answer»

String literals are those variables STORING string constants that can be a single CHARACTER or that can be obtained as a result of the CONCATENATION of a sequence of characters. GO provides two types of string literals. They are:

  • Raw string literals: Here, the values are uninterrupted character sequences between backquotes. For example:
`interviewbit`
  • INTERPRETED string literals: Here, the character sequences are enclosed in double quotes. The value may or may not have new lines. For example:
"InterviewbitWebsite"


Discussion

No Comment Found