CuriousTab
CuriousTab
Home
Aptitude
Computer
C Programming
C# Programming
C++ Programming
Database
Java Programming
Networking
Engineering
Biochemical Engineering
Biochemistry
Biotechnology
Chemical Engineering
Civil Engineering
Computer Science
Digital Electronics
Electrical Engineering
Electronics
Electronics and Communication Engineering
Mechanical Engineering
Microbiology
Technical Drawing
GK
Current Affairs
General Knowledge
Reasoning
Data Interpretation
Logical Reasoning
Non Verbal Reasoning
Verbal Ability
Verbal Reasoning
Exams
AIEEE
Bank Exams
CAT
GATE
IIT JEE
TOEFL
Jobs
Analyst
Bank Clerk
Bank PO
Database Administrator
IT Trainer
Network Engineer
Project Manager
Software Architect
Discussion
Home
‣
C# Programming
‣
Strings
See What Others Are Saying!
Question
Which of the following statements are correct about the String Class in C#.NET?
Two strings can be concatenated by using an expression of the form
s3 = s1 + s2;
String is a primitive in C#.NET.
A string built using
StringBuilder
Class is Mutable.
A string built using
String
Class is Immutable.
Two strings can be concatenated by using an expression of the form
s3 = s1&s2;
Options
A. 1, 2, 5
B. 2, 4
C. 1, 3, 4
D. 3, 5
Correct Answer
1, 3, 4
More questions
1. Code that targets the Common Language Runtime is known as
Options
A. Unmanaged
B. Distributed
C. Legacy
D. Managed Code
E. Native Code
Show Answer
Scratch Pad
Discuss
Correct Answer: Managed Code
2. Which of the following are the correct ways to declare a delegate for calling the function
func()
defined in the sample class given below?
class Sample { public int func(int i, Single j) { /* Add code here. */ } }
Options
A.
delegate d(int i, Single j);
B.
delegate void d(int, Single);
C.
delegate int d(int i, Single j);
D.
delegate void (int i, Single j);
E.
delegate int sample.func(int i, Single j);
Show Answer
Scratch Pad
Discuss
Correct Answer:
delegate int d(int i, Single j);
3. Which of the following statements is correct about properties used in C#.NET?
Options
A. Every property must have a set accessor and a get accessor.
B. Properties cannot be overloaded.
C. Properties of a class are actually methods that work like data members.
D. A property has to be either read only or a write only.
Show Answer
Scratch Pad
Discuss
Correct Answer: Properties of a class are actually methods that work like data members.
4. Which of the following assemblies can be stored in Global Assembly Cache?
Options
A. Private Assemblies
B. Friend Assemblies
C. Shared Assemblies
D. Public Assemblies
E. Protected Assemblies
Show Answer
Scratch Pad
Discuss
Correct Answer: Shared Assemblies
5. Which of the following statements are correct?
A struct can contain properties.
A struct can contain constructors.
A struct can contain protected data members.
A struct cannot contain methods.
A struct cannot contain constants.
Options
A. 1, 2
B. 3, 4
C. 1, 2, 4
D. 3, 5
Show Answer
Scratch Pad
Discuss
Correct Answer: 1, 2
6. Which of the following is the correct size of a
Decimal
datatype?
Options
A. 8 Bytes
B. 4 Bytes
C. 10 Bytes
D. 16 Bytes
E. None of the above.
Show Answer
Scratch Pad
Discuss
Correct Answer: 16 Bytes
7. Which of the following statements are correct about inspecting an attribute in C#.NET?
An attribute can be inspected at link-time.
An attribute can be inspected at compile-time.
An attribute can be inspected at run-time.
An attribute can be inspected at design-time.
Options
A. 1, 2
B. 3, 4
C. 1, 3, 4
D. All of the above
E. None of the above
Show Answer
Scratch Pad
Discuss
Correct Answer: 1, 2
8. In C#.NET if we do not catch the exception thrown at runtime then which of the following will catch it?
Options
A. Compiler
B. CLR
C. Linker
D. Loader
E. Operating system
Show Answer
Scratch Pad
Discuss
Correct Answer: CLR
9. Which of the folowing does an indexer allow to index in the same way as an array?
A class
A property
A struct
A function
An interface
Options
A. 1, 3, 5
B. 2, 4
C. 3, 5
D. 3, 4, 5
Show Answer
Scratch Pad
Discuss
Correct Answer: 1, 3, 5
10. Which of the following is NOT an Assignment operator in C#.NET?
Options
A. \=
B. /=
C. *=
D. +=
E. %=
Show Answer
Scratch Pad
Discuss
Correct Answer: \=
Comments
There are no comments.
Enter a new Comment
Save
More in C# Programming:
Arrays
Attributes
Classes and Objects
Collection Classes
Constructors
Control Instructions
Datatypes
Delegates
Enumerations
Exception Handling
Functions and Subroutines
Generics
Inheritance
Interfaces
Namespaces
.NET Framework
Operators
Polymorphism
Properties
Strings
Structures