Pointers of C#.Net Interview Questions(6)
1.What is Pointer?
A)Pointer is avariable
which stores the address of the another variable.
2.Is Pointers supported
in C#.Net?
A)Yes.Pointers supported
in C#.Net.The code that has been written using pointers is known as unsafe
code.
3.What is Unsafe Code?
A) Unsafe Code means CLR
doesnot provide any security for the code.
4.How can we represent
unsafe code?
A) unsafe code should be
written using “unsafe” keyword within the unsafe block or unsafe function or
unsafe class.Unsafe code must be compiled using unsafe option only.
5.How can we declare
pointers variable?
A)Syntax: Datatype* variablename;
EG:int* x;
6.What is the difference
between reference types and pointers?
A)Refernce types are
maintained by pointers only CLR will provide complete security for the
reference types.Where as pointers CLR doesn’t provide any security.
0 comments:
Post a Comment