Академический Документы
Профессиональный Документы
Культура Документы
a) Pane
b) Button
c) DataList (ANS)
d) None of the Above
10) Which of the following languages can be used to write server side scripting in ASP.NET?
a) C# (ANS)
b) C
c) Visual Basic
11) The Following are the minimum requirement to run Asp.net pages
a) Java Virtual Machine
b) Common Language Runtime (ANS)
c) Windows explorer
12) When a .aspx page is requested from the web server, the out put will be rendered to browser in following
format.
a) HTML (ANS)
b) XML
c) WML
13) What executable unit gets created when we build an ASP.Net application?
a) . DLL (ANS)
b) . EXE
c) . COM
14) The best way to delimit ASP.Net code from HTML code in your pages is by using --------------- tags.
a) < Body >
b) < Head >
c) < Script > (ANS)
15) The Asp.net server control, which provides an alternative way of displaying text on web page, is
a) < asp:label > (ANS)
b) < asp:listitem >
c) < asp:button >
16) asp:dropdownlist> tag replaces which of the HTML tags
a) < Option >
b) < Select > (ANS)
c) < List >
17) < asp : listitem > tag replaces which of the following HTML tags
a) < Option > (ANS)
b) < UL >
c) < List >
18) The first event to be triggered in an aspx page is
a) Page_Load()
b) Page_Init()(ANS)
c) Page_click()
generated dataset
a) Fill ( ) (ANS)
b) ExecuteQuery ( )
c) Read ( )
22) How many configuration files can an ASP.NET projects have?
a) More Than One
b) One (ANS)
c) None
23) How do you register a user control?
a) Add Tag prefix, Tag name
b) Add Source, Tag prefix
c) Add Src, Tagprefix, Tagname (ANS)
24) Which of the following is true ?
a) User controls are displayed correctly in the Visual Studio .NET Designer
b) Custom controls are displayed correctly in VS.Net Designer (ANS)
c) User and Custom controls are displayed correctly in the Visual Studio .NET Designer
25) Can a dll run as stand alone application ?
a) No (ANS)
b) Yes
c) Sometimes we can make it by introducing some code
26) Which of the following is true ?
a) IsPostBack is a method of System.UI.Web.Page class
b) IsPostBack is a method of System.Web.UI.Page class
c) IsPostBack is a readonly property of System.Web.UI.Page class (ANS)
27) It is possible to set Maximum length for a text box through code
a) True (ANS)
b) False
28) The number of forms that can be added to a aspx page is
a) 2
b) 3
c) 1 (ANS)
d) More than 3
e) More than 30
c) 1 (ANS)
d) More than 3
56) The interface used by ASP.Net to create Unique Ids?
a) AppDomainsetup
b) System.UI.Naming.Container (ANS)
c) IAsyncResult
d) customFormatter
57) Which property of the session object is used to set the local identifier ?
a) SessionId
b) LCID (ANS)
c) Item
d) Key
58) Select the caching type supported by ASP.Net
a) Output Caching
b) DataCaching
c) Both a & b (ANS)
d) None of the above
59) Where is the default Session data is stored in ASP.Net
a) InProcess (ANS)
b) StateServer
c) SQL Server
d) All of the above
60) How do you disable client side validation ?
a) Set the language property to C#
b) Set the Runat property to server
c) Set the ClientTarget property to Downlevel (ANS)
d) Set the inherits property to codeb
61) Select the validation control used for PatternMatching
a) FieldValidator
b) RegularExpressionValidator (ANS)
c) RangeValidator
d) PatternValidator
62) How do you trace the application_End event on runtime?
a) By Debugging
b) By Tracing
c) Can not be done (ANS)
63) Who can access Session state variables
a) All Users of an application
b) A Single session (ANS)
c) All users within a single tunnel
1, 1, 1, 1,
11, 1, 11, 11,
11, 11, 11, 11,
11, 11, 21, 11,
11, 11, 21, 21,
Answer: Option B
68. What will be the output of the C#.NET code snippet given below?
namespace IndiabixConsoleApplication
{
class SampleProgram
{
static void Main(string[] args)
{
int[]arr = newint[]{ 1, 2, 3, 4, 5 };
fun(ref arr);
}
static void fun(ref int[] a)
{
for (int i = 0; i < a.Length; i++)
{
a[i] = a[i] * 5;
Console.Write(a[ i ] + " ");
}
}
}
}
A.
B.
C.
D.
E.
12345
6 7 8 9 10
5 10 15 20 25
5 25 125 625 3125
6 12 18 24 30
Answer: Option C
69. Which of the following statements are correct?
An argument passed to a ref parameter need not be initialized first.
Variables passed as out arguments need to be initialized prior to being passed.
Argument that uses params keyword must be the last argument of variable argument list of a method.
Pass by reference eliminates the overhead of copying large data items.
To use a ref parameter only the calling method must explicitly use the ref keyword.
A.
B.
C.
D.
E.
1, 2
2, 3
3, 4
4, 5
None of these
Answer: Option C
70. A function returns a value, whereas a subroutine cannot return a value.
A.
True B.
False
Answer: Option A
71. Which of the following statements are correct about functions and subroutines used in C#.NET?
A function cannot be called from a subroutine.
The ref keyword causes arguments to be passed by reference.
While using ref keyword any changes made to the parameter in the method will be reflected in that variable when
control passes back to the calling method.
A subroutine cannot be called from a function.
Functions and subroutines can be called recursively.
A.
B.
C.
D.
E.
1, 2, 4
2, 3, 5
3, 5
4, 5
None of these
Answer: Option B
72.Which of the following statements is correct about the C#.NET code snippet given below?
class Student s1, s2; // Here 'Student' is a user-defined class.
s1 = new Student();
s2 = new Student();
A.
B.
C.
D.
E.
Answer: Option C
73. Which of the following statements is correct about the C#.NET code snippet given below?
class Sample
{
private int i;
public Single j;
private void DisplayData()
{
Console.WriteLine(i + " " + j);
}
public void ShowData()
{
Console.WriteLine(i + " " + j);
}
}
A.
B.
C.
D.
E.
Answer: Option E
74. Which of the following statements are correct?
Instance members of a class can be accessed only through an object of that class.
A class can contain only instance data and instance member function.
All objects created from a class will occupy equal number of bytes in memory.
A class can contain Friend functions.
A class is a blueprint or a template according to which objects are created.
A.
1, 3, 5
B.
2, 4
C.
3, 5
D.
2, 4, 5
E.
None of these
Answer: Option A
75. Which of the following statements is correct?
A.
Procedural Programming paradigm is different than structured programming paradigm.
B.
Object Oriented Programming paradigm stresses on dividing the logic into smaller parts and writing
procedures for each part.
C.
Classes and objects are corner stones of structured programming paradigm.
D.
Object Oriented Programming paradigm gives equal importance to data and the procedures that work on the
data.
E.
C#.NET is a structured programming language.
Answer: Option D
76.Which of the following is the correct way to create an object of the class Sample?
Sample s = new Sample();
Sample s;
Sample s; s = new Sample();
s = new Sample();
A.
1, 3
B.
2, 4
C.
1, 2, 3
D.
1, 4
E.
None of these
Answer: Option A
Question Here.
Answer:
1. C) i, ii and iv only
2. B) System.ValueType
3. D) All i, ii, iii and iv
4. D) All i, ii, iii and iv
5. A) i-d, ii-c, iii-a, iv-b
6. A) 25
7. B) Value Parameter
8. A)<Access Specifier><Return Type> <Method Name> (parameter list) {Method body}
9. D) All i, ii, iii
10. C) i-True, ii-True, iii-False
Question Here
Objective Questions in C#
1. In C# variables are categorized into ..........
i) Value types
ii) ^
iii) <<
iv) >>
7. While passing parameter to a method ................ copies the actual value of an argument into the formal parameter
of the function.
A) Output Parameter
B) Value Parameter
C) Reference Parameter
D) Initial Parameter
8. In C# methods can be defined by using which of the following syntex?
A) <Method Name> (parameter list) { Method body }
B) <Method Name> <Return Type> <Access Specifier> (parameter list) { Method body }
C) <Return Type> <Method Name> <Access Specifier> (parameter list) { Method body }
D) None of the above
9. Which of the following are the methods to assign values to an array?
i) double [ ] score = {234.0, 214.5, 572.0};
ii) int [ ] marks = new int [3] {33, 45, 67};
iii) int [ ] marks = new int [ ] {33, 45, 67};
A) i and ii only
B) ii and iii only
C) i and iii only
D) All i, ii, iii