AmbitionBox
Discover Best Places to work in India
Discover best places to work
Compare & find best workplace
Bring your workplace to life
Highlight your company's perks
Read reviews for 6L+ companies
Rate your former or current company
Discover salaries for 8L+ companies
Calculate your take home salary
Check your market value
Help other jobseekers
Read interviews for 90K+ companies
Interviews questions for 1K+ colleges
Contribute your interview questions
C# Programming
Which of the following is used to define the member of a class externally?
:
::
#
none of the mentioned
Answer: Option (B)
What is the most specified using class declaration ?
type
scope
type & scope
None of mentioned
General form of class declaration in C# is : class class_name { member variables variable1; variable2; variableN; method1(parameter_list) { method body } method2(parameter_list) { method body } methodN(parameter_list) { method body } }
Which of following statements about objects in “C#” is correct?
Everything you use in C# is an object, including Windows Forms and controls
Objects have methods and events that allow them to perform actions
All objects created from a class will occupy equal number of bytes in memory
None of the mentioned
Answer Options (A), (B) and (C)
By definition.
“A mechanism that binds together code and data in manipulates, and keeps both safe from outside interference and misuse.In short it isolates a particular code and data from all other codes and data. A well-defined interface controls the access to that particular code and data.”
Abstraction
Polymorphism
Inheritance
Encapsulation
Answer: Option (D)
The data members of a class by default are ?
protected,public
private,public
private
public
Answer: Option (C)
Correct way of declaration of object of the following class is ? class name
name n = new name();
n = name();
name n = name();
n = new name();
Answer: Option (A)
What does the following code imply ? csharp abc; abc = new charp();
Object creation on class csharp
Create an object of type csharp on heap or on stack depending on the size of object
create a reference c on csharp and an object of type csharp on heap
create an object of type csharp on stack
Which of the following string() method are used to compare two strings with each other?
CopyTo()
Copy()
Compare()
CompareTo()
Creates a new string by copying one string to another.
Which of the following statement is correct about a string in C#.NET?
The System.Array class is used to represent a string
A string has a zero-based index
A number cannot be represented in the form of a string
A string is mutable because it can be modified once it has been created
Choose Output for the following set of code :
staticvoid Main(string[] args)
{
string s1 ="Hello"+" I "+"Love"+" ComputerScience ";
Console.WriteLine(s1);
Console.ReadLine();
}
HelloILoveComputerScience
Hello I Love ComputerScience
Compile time error
Hello
Here ‘+’ defined operator works as concatenation for strings. Output : Hello I Love ComputerScience.
Join India’s largest community to research company culture
Are you a student or working professional?
Student/Never worked
I am a student/I have never worked
Working Professional
I am working/I have worked before
What are your preferred job locations?
Popular Cities
Other Cities
Follow your preferred designations/job profiles
Suggestions based on your job profile
vs
Similar Companies