Documente Academic
Documente Profesional
Documente Cultură
Home
About
Jobs
Contact
C-Tutorials
C-MCQs
Computer-Science-MCQs
C++MCQs
College-Projects
Java-MCQs
C-Programs
C#MCQs
Testimonials
Linux-MCQs
Internship
Developers
SAN-MCQs
Best-Books
Advertisements
THERE WILL BE
HATERS
Best Training
Courses
SAN II - Administration Training
Linux Fundamentals/Administration
Hover to Expand
Advanced C Programming
Linux-C Debugging Techniques
Linux System Programming
1.
class math
2.
Device Driver
Trainings
3.
int ad;
4.
5.
6.
get
7.
8.
return ad;
9.
10.
11.
12.
Advertisements
b)
1.
class math
2.
3.
4.
5.
get
6.
http://www.sanfoundry.com/csharp-mcqs-properties-applications/
1/13
2/25/2015
6.
7.
return ad;
8.
9.
10.
}
}
c)
1.
class math
2.
3.
int ad;
4.
5.
6.
get
7.
8.
return ad;
9.
10.
set
11.
12.
ad = value;
13.
14.
15.
}
}
Technical Career
Developer Tracks
View Answer
SAN Developer
a)
1.
class math
2.
Mentoring
Productivity
3.
4.
GDB Assignment
Feedback
5.
set
6.
Advertisements
7.
add = value;
8.
9.
10.
Coding-Style
}
}
b)
1.
class math
http://www.sanfoundry.com/csharp-mcqs-properties-applications/
2/13
2/25/2015
1.
class math
2.
3.
int ad;
4.
5.
6.
set
7.
8.
ad = value;
9.
10.
11.
1000 C# MCQs |
Quiz
Integer Data Types
Floating and Decimal Data Types
Char Types and String Literals
Initialization of Variables
c)
1.
class math
Arithmetic Operators
2.
3.
int ad;
4.
IF Statements
5.
Switch Statements
6.
get
7.
8.
return ad;
10.
set
Fundamentals of Class
11.
9.
12.
ad = value;
13.
14.
15.
Methods in Class
Constructors in Class
Destructors in Class
Array and Initialization
Basic Operation on Strings
String Class with Description
Comparison of Strings
Method Overloading
Method Overriding
1.
class number
2.
3.
http://www.sanfoundry.com/csharp-mcqs-properties-applications/
Constructor Overloading
Abstract Class & Methods
Introduction of Overloaded Operators
Recursion
3/13
2/25/2015
4.
5.
6.
Recursion
Introduction of Indexers
Introduction of Properties
Properties and its Applications
7.
get
8.
9.
Interfaces Introduction
Interfaces Implementation
return num1;
10.
11.
set
12.
13.
num1 = value;
14.
Attributes
Introduction of Console I/O Operations
15.
16.
17.
18.
get
19.
20.
Byte Stream
Character Stream
return num2;
21.
22.
set
23.
24.
Fundamental of Generics
26.
Delegates in Detail
Events
num2 = value;
25.
Fundamental of Delegates
Generic Methods
Fundamental of LINQ
Operation and Query with LINQ
Introduction of Reflections
27.
Collection Classes
28.
class Program
Maths Class
29.
Rounding Functions in C#
30.
Math Methods
31.
Multi-threaded Programming - 1
32.
Multi-threaded Programming - 2
33.
p.anumber = 20;
Iterators
34.
Fundamentals of Namespaces
35.
k.anumber1 = 40;
Fundamentals of Preprocessors
36.
int m = p.anumber;
37.
int t = k.anumber1;
Fundamental of Networking
38.
URI class
39.
40.
41.
42.
Console.ReadLine();
43.
44.
}
}
Type Interface
Unsafe Code & Pointers Basics
Pointers Operation - 1
Pointers Operation - 2
Accessor Controls of Class
Introduction of String Formatting
String Formatting - 1
a) 0
b) Compile time error
c) 60
d) None of the above mentioned
View Answer
http://www.sanfoundry.com/csharp-mcqs-properties-applications/
String Formatting - 2
1.2k
4/13
2/25/2015
View Answer
1.
class number
2.
Subscribe to Sanfoundry
3.
4.
5.
6.
7.
get
8.
9.
return num1;
10.
11.
set
12.
13.
num1 = value;
14.
15.
16.
17.
18.
get
19.
20.
return num2;
21.
22.
set
23.
24.
num2 = value;
25.
26.
27.
28.
class Program
29.
30.
31.
32.
33.
34.
int m = p.anumber;
35.
int t = k.anumber1;
36.
37.
38.
Console.ReadLine();
39.
40.
1.5k
}
}
a) 0
http://www.sanfoundry.com/csharp-mcqs-properties-applications/
5/13
2/25/2015
b) 120
c) 1200
d) Compile time error
View Answer
6. What will be the output of following snippet of code?
1.
class number
2.
3.
4.
5.
6.
get
7.
8.
return length;
9.
10.
set
11.
12.
length = value;
13.
14.
15.
16.
class Program
17.
18.
19.
20.
21.
22.
int k = p.number1 * 3 / 9;
23.
Console.WriteLine(k);
24.
Console.ReadLine();
25.
26.
}
}
a) 0
b) 180
c) 30
d) Compile time error
View Answer
7. What will be the output of following snippet of code?
1.
class number
2.
3.
4.
http://www.sanfoundry.com/csharp-mcqs-properties-applications/
6/13
2/25/2015
4.
5.
6.
get
7.
8.
return length;
9.
10.
11.
12.
class Program
13.
14.
15.
16.
17.
int l;
18.
l = p.number1 + 40;
19.
int k = l * 3 / 4;
20.
Console.WriteLine(k);
21.
Console.ReadLine();
22.
23.
}
}
a) 30
b) 75
c) 80
d) 0
View Answer
8. What will be the output of following snippet of code?
1.
class student
2.
3.
4.
5.
6.
get
7.
8.
if (index < 5)
9.
return scores[index];
10.
else
11.
12.
Console.WriteLine("invalid index");
13.
return 0;
14.
15.
16.
set
17.
http://www.sanfoundry.com/csharp-mcqs-properties-applications/
7/13
2/25/2015
18.
if (index < 5)
19.
scores[index] = value;
20.
else
21.
Console.WriteLine("invalid index");
22.
23.
24.
25.
class Program
26.
27.
28.
29.
30.
Console.WriteLine(s[4] + 8);
31.
Console.ReadLine();
32.
33.
a) 73
b) 37
c) 0
d) Run time error
View Answer
9. Correct way to implement the property for which property reports the
error invalid index if user attempts to cross bounds of the array for a
student class with 5 intger arrays.
a)
1.
class student
2.
3.
4.
5.
6.
get
7.
8.
if (index < 5)
9.
return scores[index];
10.
else
11.
12.
Console.WriteLine("invalid index");
13.
return 0;
14.
15.
16.
set
17.
18.
if (index < 5)
19.
scores[index] = value;
20.
else
http://www.sanfoundry.com/csharp-mcqs-properties-applications/
8/13
2/25/2015
20.
else
21.
Console.WriteLine("invalid index");
22.
23.
24.
}
}
b)
1.
class student
2.
3.
4.
5.
6.
get
7.
8.
if (index < 5)
9.
return scores[index];
10.
else
11.
12.
Console.WriteLine("invalid index");
13.
return 0;
14.
15.
16.
17.
}
}
c)
1.
class student
2.
3.
4.
5.
6.
set
7.
8.
if (index < 5)
9.
return scores[index];
10.
else
11.
12.
Console.WriteLine("invalid index");
13.
return 0;
14.
15.
16.
17.
}
}
http://www.sanfoundry.com/csharp-mcqs-properties-applications/
9/13
2/25/2015
17.
class student
2.
3.
4.
5.
6.
get
7.
8.
if (index < 3)
9.
return scores[index];
10.
else
11.
12.
Console.WriteLine("invalid index");
13.
return 0;
14.
15.
16.
private
17.
set
18.
if (index < 3)
19.
scores[index] = value;
20.
else
21.
Console.WriteLine("invalid index");
22.
23.
24.
25.
class Program
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
else
38.
39.
40.
http://www.sanfoundry.com/csharp-mcqs-properties-applications/
10/13
2/25/2015
40.
41.
42.
Console.ReadLine();
43.
44.
}
}
a) 0
b) Compile time error
c) Run time error
d) scores had greater value : 13
scores had greater value : 32
scores1 had greater value : 40
View Answer
Sanfoundry Global Education & Learning Series C# Programming
Language.
Heres the list of Best Reference Books in C# Programming Language.
To practice all features of C# programming language, here is complete
set on 1000+ Multiple Choice Questions and Answers on C#
0
Tweet
Advertisements
*
Email Address
http://www.sanfoundry.com/csharp-mcqs-properties-applications/
11/13
2/25/2015
*
Subscribe
Read Next:
1. C# Program to Demonstrate Properties of the Class
2. C# Questions & Answers Introduction of Properties
3. C# Questions & Answers Introduction of Indexers
4. Python Questions and Answers Files 1
5. C# Questions & Answers Implementation of Exception
Handling
and SAN
Architect and
is passionate
about
Manish Bhojasia
Follow
1,289 followers
Sanfoundry
Follow
+1
+ 1,539
http://www.sanfoundry.com/csharp-mcqs-properties-applications/
12/13
2/25/2015
Copyright
Technology Groups
Sanfoundry is No. 1 choice for Deep Hands-ON Trainings in SAN, Linux & C, Kernel & Device Driver Programming. Our Founder has trained
employees of almost all Top Companies in India. Here are few of them: VMware, Citrix, Oracle, Motorola, Ericsson, Aricent, HP, Intuit, Microsoft,
Cisco, SAP Labs, Siemens, Symantec, Redhat, Chelsio, Cavium Networks, ST Microelectronics, Samsung, LG-Soft, Wipro, TCS, HCL, IBM,
Accenture, HSBC, Northwest Bank, Mphasis, Tata Elxsi, Tata Communications, Mindtree, Cognizant, mid size IT companies and many Startups.
Students from top Universities and colleges such as NIT Trichy, BITS Pilani, University of California, Irvine, University of Texas, Austin & PESIT
Bangalore have benefited a lot from these courses as well. The assignments and real time projects for our courses are of extremely high quality
with excellent learning curve.
Register for Expert Level Training Classes by our Founder & CTO. Alternatively, call us for your Corporate Training or College Training
needs.
Responsive Theme powered by
2015 Sanfoundry
WordPress
http://www.sanfoundry.com/csharp-mcqs-properties-applications/
13/13