Create a string literal in a code


Discussion:

Q: Assuming the string variable myvar contains the string literal "C# Programming", what will be written to the console for the following statements:

(a) Console.Write(myvar.IndexOf("Prog'',3);

(b) Console.Write(myvar.LastIndexOfAny('d');

(c) Console.Write(myvar.CompareTo("myvar");

(d) Console.Write(myvar.Substring(3,5);

Solution Preview :

Prepared by a verified Expert
DOT NET Programming: Create a string literal in a code
Reference No:- TGS01938017

Now Priced at $20 (50% Discount)

Recommended (95%)

Rated (4.7/5)