1) A local variable
|
a) Can be used
anywhere in the program
|
b)
Is declared within a method - correct answer
|
c) Must accept a class
|
d) Represent a class
object
|
2) An instance variable
|
a) is an object
of a class
|
b) represents
an attribute of an object - correct answer
|
c) is a method of a
class
|
d) a and c
|
3) Private Button print = new button();
|
a) creates a button
control
|
b) initializes a
button control
|
c) instantiates
button control
|
d) a and b
|
e)
a and c - correct answer
|
4) An instance method
|
a)
Represents the behavior of an object - correct answer
|
b) Represents the
attribute of an object
|
c) Represents another
class
|
d) a and b
|
5) A Constructor
|
a) is used to create
objects
|
b) must have the same
name as the class it is declared within
|
c) maybe overloaded
|
d) b and c
|
e)
all of the above - correct answer
|
6) class Test: Form { }
|
a) Creates the class
Test : Form
|
b)
Creates the class Test that inherits the class Form - correct
answer
|
c) Creates the class
form that inherits the class Test
|
d) a and b
|
7) A variable declared inside a method is called
a________variable
|
a) Static
|
b) Private
|
c)
Local - correct answer
|
d) Serial
|
e) b and d
|
8) Defining two methods with the same name but with different
parameters is called.
|
a) Loading
|
b)
Overloading - correct answer
|
c) Multiplexing
|
d) Duplexing
|
9) Find any errors in the following BankAccount constructor:
Public int BankAccount() { balance = 0; }
|
a) Name
|
b) Formal parameters
|
c)
Return type - correct answer
|
d) No errors
|
10) In the body of a method, C# uses the variable named_____to
refer to the current object whose method is being invoked.
|
a) call
|
b)
this - correct answer
|
c) do
|
d) that
|
11) String mystring; Creates a(n)
|
a) Class
|
b) Constructor
|
c)
Object - correct answer
|
d) a and b
|
12) An Event is
|
a)
The result of a users action - correct answer
|
b) result of a party
|
c) code to force users
action
|
13) A delegate defines
|
a) a Wahsington
representative
|
b)
a class that encapsulates methods - correct answer
|
c) a means of passing
arrays into methods
|
d) a substitue for an
inherited method
|
14) Is it possible to pass methods as arguments for other
methods without modification.
|
a)
True - correct answer
|
b) False
|
15) All interfaces must contain IDrivable
|
a) True
|
b)
False - correct answer
|
16) What is the proper header for a class that intends to use
an interface.
|
a) class MyClass IFace
|
b) class MyClass ;
IFace
|
c)
class MyClass : IFace - correct answer
|
d) class MyCalss
{IFace}
|
e) class
MyCalss(IFace)
|
17) In order for a class to use an interface, it must
|
a) inherit the
properties of the interface
|
b) contain the same
methods as the interface
|
c) create an interface
objects
|
d) a and b
|
e)
all of the above - correct answer
|
18) Every class directly or indirectly extends the______class.
|
a) System
|
b)
Object - correct answer
|
c) Drawing
|
d) Console
|
19) The concept of composition specifies that you can.
|
a) Compose good code
with C#
|
b)
Compose C# projects with different objects - correct answer
|
d) Reduce errors by
remaining composed during programming
|
e) all of the
above
|
20) Polymorphism occurs when the methods of the child class.
|
a) Override the parent
class methods but maintain the implementation
|
b)
Maintain the same return type and arguments as the parent class, but
implement it differently - correct answer
|
c) Have different
return types and arguments than the parent class
|
d) Are Virtual
|
21) To output the value of multidimensional array,
Console.WriteLines(___)
|
a)
myArray[1][3]; - correct answer
|
b) myArray[1.3];
|
c) myArray{1}{3};
|
d) myArray(1),(3);
|
22) All methods in an abstract base class must be declared
abstract.
|
a) True
|
b)
False - correct answer
|
23) Methods that are declared abstract in the base class must
show implementation at the time of declaration.
|
a) True
|
b)
False - correct answer
|
24) The code public class B : A { }
|
a) Defines a class
that inherits all the methods of A
|
b)
Defines a class that inherits the public and protected methods of A
only - correct answer
|
c) Errors
|
d) a and b
|
25) Assuming that public class B : A { public B(int i)
:base(i) { } } compiles and runs correctly, what can we conclude about the
constructors in the class A?
|
a) One constructor
takes an argument of type i
|
b) There is only a
default constructor
|
c)
One constructor takes an arguments of the type int - correct
answer
|
d) a and b
|
26) Classes declared with the sealed keyword cannot be base
class.
|
a)
True - correct answer
|
b) False
|
27) A method_____an exception when that method detects that a
problem has occured.
|
a) Trys
|
b) Catches
|
c)
Throws - correct answer
|
d) a and b
|
28) Exception objects are derived from the class.
|
a) Try
|
b) Catch
|
c)
Exception - correct answer
|
d) Event
|
e) System
|
29) An abstract class
|
a) may contain
instance variables
|
b) may contain
constructors
|
c) may extend
another class
|
d) a and b
|
e)
all of the above - correct answer
|
30) A____block enclose the code that could throw an exception.
|
a)
Try - correct answer
|
b) Catch
|
c) Exception
|
d) Error
|
e) a and b
|
31) A Thread is:
|
a)
an object that allows computer multitasking - correct answer
|
b) an object that
wraps itself with other threads
|
c) a deprecated
object that is no longer used
|
32) Synchronization is:
|
a) the delaying
of a thread until there is sufficient memory and work to keep it up
|
b) making every thread
start and end at the same time
|
c) make each thread do
the same thing
|
d) have each thread
start at the same time but not necessarily finish together
|
e)
wait until the required resources, that are used by other threads become
available - correct answer
|
33) In C# Thread.Sleep(time) measures time in:
|
a) seconds
|
b)
milliseconds - correct answer
|
c) nanoseconds
|
d) all of the above
|
34) When a thread returns from a WaitSleepJoin or Suspended
state it returns to the:
|
a) Unstarted state
|
b) Stopped state
|
c)
Started state (now considering a part of the running state) - correct
answer
|
d) Resume state
|
35) The ThreadPriority enumeration does not contain:
|
a) Lowest
|
b) Highest
|
c) BelowNormal
|
d)
None of the above - correct answer
|
36) The way of returning a thread from s suspended state is:
|
a) Pulse
|
b) PulseAll
|
c) Interrupt
|
d)
Resume - correct answer
|
e) ReStart
|
37) In order to lock/unlock an object use the.
|
a) Lock and
Unlock methods
|
b)
Enter and Exit methods - correct answer
|
c) Close and Open
methods
|
d) Close and Allow
methods
|
38) Class String and the Char structure found in the:
|
a) System.Strings
namespace
|
b) System.Text
namespace
|
c) System.Chars
namespace
|
d)
System namespace - correct answer
|
39) A String literal is a:
|
a) only contains one
character
|
b) contains numbers
rather than letters
|
c)
sequence of characters in double quotation marks - correct answer
|
d) contains exactly
its variable name and nothing else
|
40) To create a string literal exclude escape sequence, use:
|
a) !string
|
b)
@string - correct answer
|
c) #string
|
d) $string
|
41) String indexers treat strings as:
|
a) binary code
|
b) 1 to string Length
|
c)
arrays of characters - correct answer
|
d) a character
|
42) If an IndexofAny method is passed an array of characters
it:
|
a) finds the first
occurrence of each letter in the string
|
b)
searches for the first occurrence of any of the characters in the
string - correct answer
|
c) will search
for the first occurrence of the sequence of characters
|
d) generates an error
|
43) Concatenating with strings are done with:
|
a) reserved words
|
b) method calls
|
c) operator
overloading
|
d)
operator overloading and method calls - correct answer
|
44) If two StringBuilder objects contain the same string then
|
a) they represent the
same meory location
|
b)
the are two different objects - correct answer
|
c) if one changes, so
will the other
|
d) None of the above
|
45) The proper way to convert a string to all lowercase is:
|
a) String =
string.ToLower(string);
|
b) ToLower(string);
|
c)
string.ToLower(); - correct answer
|
d)
string.ToLower(string);
|
The best resource for .NET Developers. This blog guides about .NET (C#.NET, ASP.NET, ASP.NET MVC, SQL Server, ADO.NET), AngularJS, JSON, HTML, JavaScript, jQuery, CSS, Bootstrap, DotNetNuke, and .NET interview questions. This blog teaches everything about the .NET. Here you can find bunch of tutorials, Tips and tricks, code samples and examples.
Friday, 11 November 2011
C# .NET Basic Interview Questions
Wednesday, 9 November 2011
10 tricks to Acing the Interview
Here are 10 tips that will
help get you on the right path to knocking their socks off.
1.
Do your research: You need to be prepared to
demonstrate that you have solid knowledge of the company, its business and its
challenges.
Do
a news search, read its recent press releases and annual report, and talk to
others. Chances are you will be asked the important question, "Why do you
want to work for our company?" or "What do you know about our
business?"
Failing
to show that you have done your research will tell your interviewer you didn't
care enough to take the time to prepare.
2.
Shut up and listen: While you will be anxious to
tell the interviewer all about your professional career, don't be so chatty
that you miss important signals and messages from the other person.
You'll
need to present your story in the context of what the interviewer is looking
for. Listen for clues and adjust.
3.
Remember what's in your resume and cover letter:
"Sometimes, especially at an initial screening, the interviewer will ask
you questions simply to gauge the accuracy of your resume and cover
letter," writes Richard Fein in his book "95 Mistakes Job Seekers
Make ... and How to Avoid Them." "If you have forgotten what you
wrote, you will lose a great deal of credibility."
Re-read
your resume before you go to your interview and be able to talk intelligently
about anything and everything included.
4.
Know how your qualifications relate to the
company's needs: It is not enough to just be prepared to talk about your skills
and qualifications. You need to relate your skills to the company's needs.
Examine the job description before the interview. Then identify the skills
needed for the job and think of how your qualifications relate to those skills.
Fein
suggests making a chart with two columns, one for skills and qualifications the
company is seeking and the other for an example of how, when and where you
demonstrated those characteristics or skills.
5.
Don't forget to prepare for telephone pre-screen
interviews: Prepare in advance for phone pre-screen interviews just as much as
you would any other interview opportunity. Fein suggests having a list of
questions ready, having your resume handy and getting yourself excited about
the conversation. "Your energy and friendliness in your voice send a
message, just as body language would at a face-to-face interview."
6.
Practice: The best way to be prepared for an
interview once you have done your research is practice.
Think
about potential interview questions such as "Tell me about yourself,"
"Why are you leaving your current employer?" and "Why should we
hire you?"
You
should also be prepared for behavioral questions, such as "Tell me about a
time when you had a problem at work and came up with a way to solve it."
Developing answers ahead of time will keep you from hemming and hawing during
the interview.
7.
Save the salary talk for later: Discussing money
is always tricky, and it is best to save the talk about salary for later, once
you have received an offer.
Fein
suggests letting the interviewer know that you are certain the company will
offer a fair salary or giving a range if you are pressed for a number.
8.
Have a list of questions for the interviewer:
Almost every interview will end with this question: "So, do you have any
questions for us?"
Fein
says that one of the biggest mistakes job seekers make is not being prepared to
answer this.
Be
sure to develop a list of questions to ask before you go to the interview. Do
not ask questions that are clearly answered on the employer's Web site and/or
in any literature provided by the employer to you in advance. Instead, ask
specific questions like "What is the organization's plan for the next five
years and how does this department fit in?" or "Could you explain
your organizational structure?"
9.
Be confident: "Everyone needs to remember
that an interview is a business meeting between professionals," Fein says.
"The company needs an employee, and you need a job."
If
you are in for an interview, the company has seen something in you that are
attractive. Now you just need to believe in yourself and let your talents
shine.
10. Follow
up: Your best-laid interview plans will go to waste if you neglect to follow up
with your interviews. Send a thank-you letter immediately after your interview
that reiterates positive characteristics about yourself and, if possible,
refers to some part of your conversation.
Subscribe to:
Posts (Atom)