.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 >> Others >> Post New Question Subscribe to Interview Questions

What is a Program Counter(PC)?

Posted By :Abhisek Panda     Posted Date :July 27, 2010    Points :10   Category :Others 
Program Counter or PC is a register inside the CPU. PC register keeps track of the execution of a program and contains the memory location of the instruction currently being executed.

During the execution of an instruction the contents of PC are updated to correspond to the address of the next instruction. So PC points to the next instruction to be executed.

You can also find related Interview Question to What is a Program Counter(PC)?  below: 

Can I use COM objects from a .NET Framework program?

  
Yes.

Any COM component you have deployed today can be used from managed code, and in common cases the adaptation is totally automatic.
Specifically, COM components are accessed from the .NET Framework by use of a runtime callable wrapper (RCW). This wrapper turns the COM interfaces exposed by the COM component into .NET Framework-compatible interfaces. For OLE automation interfaces, the RCW can be generated automatically from a type library. For non-OLE automation interfaces, a developer may write a custom RCW and manually map the types exposed by the COM interface to .NET Framework-compatible types.


Shashi Ray (More...)

Can .NET Framework components be used from a COM program?

  
Yes

Managed types you build today can be made accessible from COM, and in the common case the configuration is totally automatic. There are certain new features of the managed development environment that are not accessible from COM. For example, static methods and parameterized constructors cannot be used from COM. In general, it is a good idea to decide in advance who the intended user of a given type will be. If the type is to be used from COM, you may be restricted to using those features that are COM accessible.
Depending on the language used to write the managed type, it may or may not be visible by default.
Specifically, .NET Framework components are accessed from COM by using a COM callable wrapper (CCW). This is similar to an RCW (see previous question), but works in the opposite direction. Again, if the .NET Framework development tools cannot automatically generate the wrapper, or if the automatic behavior is not what you want, a custom CCW can be developed.

Shashi Ray (More...)

Can I call a Win32 API function from a C# program?

  
Yes, you can.The .NET Framework provides a set of services called Platform Invoke, also known as PInvoke. Refer to the .NET Framework documentation for examples of using PInvoke services. (More...)

How to use Win32 API from a .NET Framework program?

  
Using platform invoke, .NET Framework programs can access native code libraries by means of static DLL entry points.

Here is an example of C# calling the Win32 MessageBox function:


using System;
using System.Runtime.InteropServices;

class MainApp
{
[DllImport("user32.dll", EntryPoint="MessageBox")]
public static extern int MessageBox(int hWnd, String strMessage, String strCaption, uint uiType);

public static void Main()
{
MessageBox( 0, "Hello, this is PInvoke in operation!", ".NET", 0 );
}
} (More...)

For designing binary counter which type of flip-flop is required?

  
We require D-Type flip-flops to design binary counter. (More...)

What will be the output of this c program. ?
int x;
x = 200 * 200/200;

  
Answer = -127 { shocked }

Because 200 * 200 = 40000
and this can't be opted in int so goes on different side and later divided by 200

-25536/200 = -127.
(More...)

What will be the output of this c program.

  
Program_
int a = 10, b = 20/3;
if(a == b );
printf("\n %d%d",a,b);
}


OutPut__

10,6 [just try] (More...)

What will be the output of this c program. ?

  
main ()

{
int i = 65;
char j ='A';
printf("\n %d %d",i,j);
printf("\n %c %c",i,j);
if(i==j)
printf("God is Great");
else
printf("It's difficult fo judge");
}


OutPut_

65 65
A A

God is Great

The output tells two things i.e. printf is capable of converting int into char and vice versa, and secondly if we compare int variable with char variable then ASCII value of that char variable is compared.

Cheers ! (More...)

In a Java multithreading program, under what circumstances will you call the yield() method of a thread?

  
1, To give other runnable threads a chance to execute.
2, To start a new thread.
3, To terminate the current thread.
4, To stop the current thread for a specific time.

Answer : 1 (More...)

what is Bootstrap loader program? Explain its purpose?

  
Bootstrapping is a technique which activates more complex / complicated system of programs. When the system is started, a program called Basic Input Output System, initializes and tests the available computer system resources like peripherals, hardware, external memory devices are connected. Later it loads a program to allow the loading of larger programs, such as operating systems. In real sense, the operating system is loaded by BIOS boot strap loader. (More...)

Can you run the java program without main method?

  
A java applet application, a web application can run without main method. A Java program can run without using ' public static void main(String args[]) ' method by using a static block.

The static block gets executed soon after the class is loaded, even prior to the 'public static void main(String args[]) '. JVM searches for main method only after exiting from the static block. JVM throws an exception if main method is not found. To avoid throwing this exception we can use System.exit(0);

The following code depicts a class without main method; with only static block and System.exit(0).

class WithoutMainMethod {
static
{
System.out.println("This class has no public static void main(String args[]) ");
System.out.exit(0);
}
}. (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