a) To create string on stack b) To reduce the size of string c) To overcome problem of stackoverflow d) None ...
View QuestionVerbatim string literal is better used for?
a) Convenience and better readability of strings when string text consist of backlash characters b) Used to initialize ...
View QuestionCorrect statement about strings are?
a) a string is created on the stack b) a string is primitive in nature c) a string created ...
View Question
What will be the output of the following C# code?
string s1 = ” I AM BEST “;
string s2;
s2 = s1.substring (5, 4);
Console.WriteLine (s2);
What will be the output of the following C# code? string s1 = " I ...
View Question
What will be the output of the following C# string? (Enter a String : BOMBAY).
static void Main(string[] args)
{
string Str, Revstr = ” “;
int Length;
Console.Write(“Enter A String : “);
Str = Console.ReadLine();
Length = Str.Length – 1;
while (Length >= 0)
{
Revstr = Revstr + Str[Length];
Length –;
}
Console.WriteLine(“Reverse String Is {0}”, Revstr);
Console.ReadLine();
}
What will be the output of the following C# string? (Enter a String : BOMBAY). static void Main(string[] ...
View Question
What will be the output of the following C# code?
static void Main(string[] args)
{
string s1 = “Delhi”;
string s2;
s2 = s1.Insert (6, “Jaipur”);
Console.WriteLine(s2);
}
What will be the output of the following C# code? static void Main(string[] args) { ...
View QuestionWhich is the String method used to compare two strings with each other?
a) Compare To() b) Compare() c) Copy() d) ConCat() Answer: b Explanation: Compare() used to compare two ...
View Question
Select the correct differences between char and varchar data types?
i. varchar is non unicode and char is unicode character data type
ii. char is ‘n’ bytes whereas varchar is actual length in bytes of data entered in terms of storage size
iii. varchar is variable in length and char is the fixed length string
iv. For varchar, if a string is less than the maximum length then it is stored in verbatim without any extra characters while for char if a string is less than the set length it is padded with extra characters to equalize its length to given length
Select the correct differences between char and varchar data types? i. varchar is non unicode and char is ...
View Question
What will be the output of the following C# code?
static void Main(string[] args)
{
char c = ‘g’;
string s = c.ToString();
string s1 = “I am a human being” + c;
Console.WriteLine(s1);
Console.ReadLine();
}
What will be the output of the following C# code? static void Main(string[] args) { ...
View QuestionWhat is the Size of ‘Char’ datatype?
a) 8 bit b) 12 bit c) 16 bit d) 20 bit Answer: c Explanation: Size of ‘Char’ datatype is 16 ...
View Question