Hey frnds plz reply of mine questions.I want to just confirm my answers.Plz reply it by today only if poss.bz tom is my another interview

1) How to Delete Dynamically Allocated Array?
a) delete a[]
b)delete a[0]
c) delete[] a
d)delete [0] a

My answer a.Correct or not

2)Can we use DML statement in function?
a)Yes
b)No
c)Temp tables
d)None

My answer d.Correct or not

3)Confusion
Hey friends I read somewhere the diff b/w stored proc & functions?
One of them is
Stored Procedure returns more than one value whereas functions return single value.

When the interviwer ask me the question,i asnwered includg my above point,but he told me no SProc do no return any value.
Please Clarify It.

4)Can we return value from SPROC?
a)No
b)Using O/p Parameters
c)Using return statement
d)B & C Both

ANSWER---??

5)Views are complied or not
a)Yes
b)No
c)Partially Compiled
d)None

ANSWER---??

6)Can we user specific data in application?
My answer no.Me correct

7)Diff b/w primary key & UNIQUE key excepts one diff primary doesn't allow NULLS whereas unique does.
One diff i told
we can craete only one primary key for a table,whereas a table can have more than one unique key.
ANy more differences?????

8) Can we call a fn. widout dbo?
I ans NO. Me correct or nt

9) Four types of files created by assembly?

10) What is candidate Key?

11)Can we implement CAS in config file?
I ans YES. Me correct or nt

12) dim txt as textbox
dim txt as new textbox
Both the above statements are same or not.If nt wats d diff?
I ans both are same. Me correct or nt

13)CAS is part of inbuild framework?
I ans YES. Me correct or nt

14)Can constructor call itself?

15)Accept method applies to
a)Textbox
b)Listbox
c)Combobox
d)None of above
MY ans a. Me correct or nt

16)What are the various data types in C#?
I ans
Int
string
char
bool
They are looking for wat i answer or any other anwer?

17)Hw can you convert private assmebly to shared assembly?
Private ssembly can be converted to shared assembly,by signing the assembly with the public Key. me correct or nt.

18) How can i destroy objects in ASP.net?
Session.Abandon() Me correct or nt

19)What are Nullable types in C#?
I raed it allows a data type to be set to NULL .
In C# ,no nULL is dere,so in C# we have set to Nothing. --RIGHT OR WRONG

DataType like integers and booleans cannot set to NULL.
But in C# ,integer is set to Nothing,& no error is coming?

Member Avatar for b1izzard

I think
4.d (using o/p parameters and return statement )
8. yes (calling a function does not depend on .dbo)
9. .Resx, .txt
12. not sure but (dim txt as new textbox - create a new object named "txt" for textbox)
13. Yes CAS is inbuilt of .NET framework managed by CLR
14. yes.

>> 1) How to Delete Dynamically Allocated Array?
Where do you see Delete() in VB.NET? You would use erase . Read more about erase

>>2)Can we use DML statement in function?
SQL user-defined functions or VB.NET functions? Either way, yes you can.

>>3)Hey friends I read somewhere the diff b/w stored proc & functions?
Sprocs can return a single integral value, so your interviewer was wrong. However there is a different in the calling conventions of a udf vs sproc. With a udf you can Select dbo.Function('') as colname where as with a sproc you have to:

Declare @i int
exec @i = sp_who
Print 'Value: ' + Cast(@i as varchar)

So UDFs as handy when you're doing something against row-data in a select statement. A UDF can return any single value & type, a sproc can only return an integer. Both can use Output parameters to pass multiple values back to the caller.

>>4)Can we return value from SPROC?
Using output parameters and return (only return integers).

>>5)Views are complied or not
What do you think? Read up on sp_refreshview

>>6)Can we user specific data in application?
That doesn't make sense. I'm glad you got it right.

>>7)Diff b/w primary key & UNIQUE key excepts one diff primary doesn't allow NULLS whereas unique does.
Read up on FOREIGN KEYs. Can you create a foreign key against a primary key, unique constraint, both, or neither? You may find another difference ;)

>>8) Can we call a fn. widout dbo?
Sure you can. If you create the fn outside of the dbo schema then calls prefixed with dbo. will fail.

>>9) Four types of files created by assembly?
What do you think?

>>10) What is candidate Key?
What do you think?

>>11)Can we implement CAS in config file?
No idea.

>>12) dim txt as textbox
Have you tried compiling and executing the statements? Based on your answer I can tell you haven't. I would look in to that more.

>>13)CAS is part of inbuild framework?
No idea

>>14)Can constructor call itself?
What do you think?

>>15)Accept method applies to
Any type that implements the method. With extension methods it could be any class :)

>>16)What are the various data types in C#?
Good start

>>17)Hw can you convert private assmebly to shared assembly?
If the access modifiers are set properly you can "convert" it by moving the assembly to the Winsxs directory and pointing the application to the assembly in its' manifest file.

>>18) How can i destroy objects in ASP.net?
This is no different than VB.NET or C#. You let the garbage collector free unreferenced objects. They could be trying to whack semantics and getting you to talk about erase in VB.NET, the IDisposable interface, and ~Finalizers .

>>19)What are Nullable types in C#? Nothing is not a valid C# keyword/directive. You use null in C#. Value-types are not nullable (struct, ex: int, DateTime) but reference types (class ex: string, any other class). However you can declare nullable value types:

int i1 = null; //invalid
      Nullable<int> i2 = null; //valid
      int? i3 = null; //valid, same as i2. the ? is a 'snippet'

Most all of your primative data types are not nullable: DateTime, Int16, Int32, Int64, UInt16, UInt32, UInt64, Byte, etc. string is the one exception, it is nullable and is arguably not a primitive data type.

Out of curiosity -- is interviewing a hobby of yours? You seem to have participated in a number of interviews:
http://www.daniweb.com/forums/thread249188.html
http://www.daniweb.com/forums/thread228081.html
http://www.daniweb.com/forums/thread228254.html
http://www.daniweb.com/forums/thread203450.html
http://www.daniweb.com/forums/thread201798.html
http://www.daniweb.com/forums/thread124237.html

hello sknake,no interviewing is not my hobby.

In every interview ,I faced new questions or may be questions seems to me new cz i m not so intelligent.

So wat to do,to know the answers only forums are my best frnd!!!!!!!!!!!!!!!!!

The above answer of functions and stored procedure is not convincing heres one below.

Function reduce redudant code in SP.Function - You can not change data while in stored procedures you can , can return only one value while SP returns multiple values, functions can be called inside a SP but not the vice veras

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.