Difference between imperative and interrogative code.

 Posted by Ddd on 2/17/2011 | Category: .NET Framework Interview questions | Views: 3572 | Points: 40
Answer:

Imperative code does not return a value. It just does performs an action.
example:

c#
void demo()
{
Console.WriteLine("welcme");

}

vb.net
sub procedures are imperative code.
sub dd()

end sub

Interrogative code does return a value.
c#
ex: int add(int a)
{
return a*5;
}

VB.NET FUNCTIONS
ex
function calc(byval a as integer) as integer
return a*5
end function


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response