ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  C Sharp
 
 


 

 
 Visual Basic interview questions  Visual Basic Interview Questions
 C Sharp interview questions  C Sharp Interview Questions
 ASP.NET interview questions  ASP.NET Interview Questions
 VB.NET interview questions  VB.NET Interview Questions
 COM+ interview questions  COM+ Interview Questions
 ADO.NET interview questions  ADO.NET Interview Questions
 IIS interview questions  IIS Interview Questions
 MTS interview questions  MTS Interview Questions
 Crystal Reports interview questions  Crystal Reports Interview Questions
 BizTalk interview questions  BizTalk Interview Questions
 Dot Net interview questions  Dot Net Interview Questions
 Exchange Server interview questions  Exchange Server Interview Questions
 SharePoint interview questions  SharePoint Interview Questions
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions
Question
what is a callback function?
 Question Submitted By :: Santhoshini244
I also faced this Question!!     Rank Answer Posted By  
 
  Re: what is a callback function?
Answer
# 1
A function that is passed (by reference) to another 
function. The other function calls the callback function 
under defined conditions
 
Is This Answer Correct ?    7 Yes 1 No
Www.lutix.com
 
  Re: what is a callback function?
Answer
# 2
one object to send message to other object is called 
callback and the Methos use to call back message are known 
as callback method.
 
Is This Answer Correct ?    2 Yes 1 No
Amit Bhardwaj
 
 
 
  Re: what is a callback function?
Answer
# 3
hi Amit,

Thank you for giving Definition. Can you give some example?.

Thanks,
Geetha
 
Is This Answer Correct ?    1 Yes 0 No
Geetha
 
  Re: what is a callback function?
Answer
# 4
Definition:
***********
Functions that are triggered when an associated event 
happens.

example 
*******

a) In C language function pointer is used as a callback 
functions.

b) In C++ virtual function are used as a callback function.

c) In c# delegate keyword is used to create a call back 
function.

example in c#
*************

using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        public delegate int execute(int a, int 
b); //declare a delegate method

        static void Main(string[] args)
        {
            Program p = new Program();     
                  
            execute ex = new execute(p.add);
            Console.WriteLine(ex(2,3));  //add method is 
executed

            ex = new execute(p.subtract);
            Console.WriteLine(ex(2, 3)); //subtract method 
is executed            
        }

        public int add(int a, int b)
        {
            return (a + b);
        }

        public int subtract(int a, int b)
        {
            return (a - b);
        }
    }
}
 
Is This Answer Correct ?    5 Yes 1 No
M.shanmuga Sundaram
 

 
 
 
Other C Sharp Interview Questions
 
  Question Asked @ Answers
 
What?s a multicast delegate?  1
Which is the best way for keeping the data in XML or SQL server..and why? Infosys8
What?s class SortedList underneath?  1
What is the difference between protected and protected internal? Fulcrum-Logic1
Difference between multi-level and multiple inheritance? Microsoft6
Can you store multiple data types in System.Array?  4
What?s a delegate?  2
what is namespace?  6
explain synchronous and asynchronous in C# Synechron1
What is Dispose method in .NET ? TCS2
Can you declare the override method static while the original method is non-static? Mind-Tree2
What happens in synchronisation? Tech-Mahindra2
What namespaces are necessary to create a localized application?  2
What?s the top .NET class that everything is derived from? Visual-Soft3
Is string reference type / value type? Accenture36
Hoe can i connect the table into the c# application?  1
What is Dispose method in .NET?  1
What is the minimum size (in bytes) of string data type in c#? Give its compatible data type in .NET Framework.  5
How can you clean up objects holding resources from within the code? Wipro1
how to use caching in our program. why we use it give one example in code  1
 
For more C Sharp Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com