.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> Aptitude >> Post New Question Subscribe to Interview Questions

Which of the following statements are correct about functions and subroutines used in C#.NET?

Posted By :volvo     Posted Date :December 02, 2013    Points :40   Category :Aptitude 
1.A function cannot be called from a subroutine.
2.The ref keyword causes arguments to be passed by reference.
3.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.
4.A subroutine cannot be called from a function.
5.Functions and subroutines can be called recursively.
A.1, 2, 4
B.2, 3, 5
C.3, 5
D.4, 5
E.None of these


Answer: Option B

You can also find related Interview Question to Which of the following statements are correct about functions and subroutines used in C#.NET?  below: 

Which of the following statements are correct about the Collection Classes available in Framework Class Library?

  
A.Elements of a collection cannot be transmitted over a network.
B.Elements stored in a collection can be retrieved but cannot be modified.
C.It is not easy to adopt the existing Collection classes for newtype of objects.
D.Elements stored in a collection can be modified only if allelements are of similar types.
E.They use efficient algorithms to manage the collection, thereby improving the performance of the program.

Answer: Option E (More...)

What are the ways available in SQL Server to execute SQL statements?

  

SQL Server uses different ways to execute SQL statements which are listed below.

1)Single SQL statement processing
2)Batch processing
3)Stored procedure and trigger execution
4)Execution plan caching and reuse
5)Parallel query processing

(More...)

I was trying to use an "out int" parameter in one of my functions. How should I declare the variable that I am passing to it?

  
You should declare the variable as an int, but when you pass it in you must specify it as 'out', like the following: int i; foo(out i); where foo is declared as follows: [return-type] foo(out int o) { } (More...)

Explain about the Boolean functions present in Javascript?

  
Three Boolean operators are present in Javascript they are
1) &&
2) II
3) /
All the operators are regarded as true unless the Javascript regards them as false. You can define these operators to make as statement false number0, null, undefined, or a string of length 0, etc. Boolean function performs these conversions explicitly. (More...)

What does break and continue statements do in JavaScript?

  
Continue statement continues the current loop (if label not specified) in a new iteration whereas break statement exits the current loop in JavaScript. (More...)

What are the Text and Image Functions?

  
PATINDEX,TEXTPTR,TEXTVALID are the Text and Image Functions (More...)

Tell me some String Functions?

  
SUBSTRING, SOUNDEX, DIFFERENCE (More...)

Tell me some Aggregate Functions?

  
BINARY_CHECKSUM
CHECKSUM
Count
Sum
AVG (More...)

Can you give an example of what might be best suited to place in the Application_Start and Session_Start subroutines?

  
The Application_Start event is guaranteed to occur only once throughout the lifetime of the application. It's a good place to initialize global variables. For example, you might want to retrieve a list of products from a database table and place the list in application state or the Cache object. SessionStateModule exposes both Session_Start and Session_End events. (More...)

Difference between stored procedures and functions ?

  
1>Procedure can return zero or n values whereas function can return one value which is mandatory.

2>Procedures can have input,output parameters for it whereas functions can have only input parameters.

3>Procedure allow select as well as DML statement in it whereas function allow only select statement in it.

4>Functions can be called from procedure whereas procedures cannot be called from function.

5>Exception can be handled by try-catch block in a procedure whereas try-catch block cannot be used in a function.

6>We can go for transaction management in procedure whereas we can't go in function.

7>Procedures can not be utilized in a select statement whereas function can be embedded in a select statement. (More...)

Sql Server System Functions?

  
@@IDENTITY
Returns the last identity value created by the current connection.

@@ERROR
Returns the error code for the last T-SQL statement that ran on the current connection. If there is no
error, then the value will be zero.

@@ROWCOUNT

Returns The row count of the previous Executed T-Sql Statement (More...)

differences between stored procedures and functions:

  
Functions
----------
1) can be used with Select statement
2) Not returning output parameter but returns Table variables
3) You can join UDF
4) Cannot be used to change server configuration
5) Cannot be used with XML FOR clause
6) Cannot have transaction within function

Stored Procedure
-----------------
1) have to use EXEC or EXECUTE
2) return output parameter
3) can create table but won't return Table Variables
4) you can not join SP
5) can be used to change server configuration
6) can be used with XML FOR Clause
7) can have transaction within SP (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend