What is the standard you use to wrap up a call to a Web service
"SOAP"
What is the transport protocol you use to call a Web service SOAP
HTTP with SOAP
What does WSDL stand for?
"WSDL stands for Web Services Dsescription Langauge. There is WSDL.exe that creates a .wsdl Files which defines how an XML Web service behaves and instructs clients as to how to interact with the service. eg: wsdl http://LocalHost/WebServiceName.asmx"
Where on the Internet would you look for Web Services?
www.uddi.org
What does WSDL stand for?
Web Services Description Language
True or False: To test a Web service you must create a windows application or Web application to consume this service?
False.
What are the various ways of accessing a web service?
1. Asynchronous Call
Application can make a call to the Web service and then continue to-do whatever it wants to do. When the service is ready it will notify the application. Application can use BEGIN and END method to make asynchronous call to the webmethod.We can use either a Wait Handle or a Delegate object when making asynchronous call.
The Wait Handle class share resources between several objects. It provides several methods which will wait for the resources to become available
The easiest and most powerful way to implement an asynchronous call is using a delegate object. A delegate object wraps up a callback function. The idea is to pass a method in the invocation of the web method. When the web method has finished it will call this callback function to process the result
2. Synchronous Call
Application has to wait until execution has completed.
What are VSDISCO files?
VSDISCO files are DISCO files that support dynamic discovery of Web services. If you place the following VSDISCO file in a directory on your Web server, for example, it returns references to all ASMX and DISCO files in the host directory and any subdirectories not noted in elements:
xmlns="urn:schemas-dynamicdiscovery:disco.2000-03-17">
How does dynamic discovery work?
ASP.NET maps the file name extension VSDISCO to an HTTP handler that scans the host directory and subdirectories for ASMX and DISCO files and returns a dynamically generated DISCO document. A client who requests a VSDISCO file gets back what appears to be a static DISCO document.
Note that VSDISCO files are disabled in the release version of ASP.NET. You can reenable them by uncommenting the line in the section of Machine.config that maps *.vsdisco to System.Web.Services.Discovery.DiscoveryRequestHandler and granting the ASPNET user account permission to read the IIS metabase. However, Microsoft is actively discouraging the use of VSDISCO files because they could represent a threat to Web server security.
Is it possible to prevent a browser from caching an ASPX page?
Just call SetNoStore on the HttpCachePolicy object exposed through the Response object's Cache property, as demonstrated here:
<%@ Page Language="C#" %>
<%
Response.Cache.SetNoStore ();
Response.Write (DateTime.Now.ToLongTimeString ());
%>
SetNoStore works by returning a Cache-Control: private, no-store header in the HTTP response. In this example, it prevents caching of a Web page that shows the current time.
Win Forms Frequently Asked Questions »
What base class do all Web Forms inherit from?
System.Windows.Forms.Form
What is the difference between Debug.Write and Trace.Write? When should each be used?
The Debug.Write call won't be compiled when the DEBUGsymbol is not defined (when doing a release build). Trace.Write calls will be compiled. Debug.Write is for information you want only in debug builds, Trace.Write is for when you want it in release build as well.
Difference between Anchor and Dock Properties?
Dock Property->Gets or sets which edge of the parent container a control is docked to. A control can be docked to one edge of its parent container or can be docked to all edges and fill the parent container. For example, if you set this property to DockStyle.Left, the left edge of the
control will be docked to the left edge of its parent control. Additionally, the docked edge of the control is resized to match that of its container
control.
Anchor Property->Gets or sets which edges of the control are anchored to the edges of its container. A control can be anchored to one or more edges of its parent container. Anchoring a control to its parent ensures that the anchored edges remain in the same position relative to the edges of the parent container when the parent container is resized.
When would you use ErrorProvider control?
ErrorProvider control is used in Windows Forms application. It is like Validation Control for ASP.NET pages. ErrorProvider control is used to provide validations in Windows forms and display user friendly messages to the user if the validation fails.
E.g
If we went to validate the textBox1 should be empty, then we can validate as below
1). You need to place the errorprovide control on the form
private void textBox1_Validating (object sender, System.ComponentModel.CancelEventArgs e)
{
ValidateName();
}
Private bool ValidateName()
{
bool bStatus = true;
if (textBox1.Text == "")
{
errorProvider1.SetError (textBox1,"Please enter your Name");
bStatus = false;
}
else
errorProvider1.SetError (textBox1,"");
return bStatus;
}
it check the textBox1 is empty . If it is empty, then a message Please enter your name is displayed.
Can you write a class without specifying namespace? Which namespace does it belong to by default?
Yes, you can, and then the class belongs to global namespace which has no name. For commercial products, naturally, you wouldn't want global namespace.
You are designing a GUI application with windows and several widgets on it. The user then resizes the app window and sees a lot of grey space, while the widgets stay in place. What's the problem?
One should use anchoring for correct resizing. Otherwise the default property of a widget on a form is top-left, so it stays at the same location when resized.
How can you save the desired properties of Windows Forms application?
.config files in .NET are supported through the API to allow storing and retrieving information. They are nothing more than simple XML files, sort of like what .ini files were before for Win32 apps.
So how do you retrieve the customized properties of a .NET application from XML .config file?
Initialize an instance of AppSettingsReader class. Call the GetValue method of AppSettingsReader class, passing in the name of the property and the type expected. Assign the result to the appropriate variable.
Can you automate this process?
In Visual Studio yes, use Dynamic Properties for automatic .config creation, storage and retrieval.
My progress bar freezes up and dialog window shows blank, when an intensive background process takes over.
Yes, you should've multi-threaded your GUI, with taskbar and main form being one thread, and the background process being the other.
What's the safest way to deploy a Windows Forms app?
Web deployment: the user always downloads the latest version of the code, the program runs within security sandbox, properly written app will not require additional security privileges.
Why is it not a good idea to insert code into InitializeComponent method when working with Visual Studio?
The designers will likely through it away, most of the code inside InitializeComponent is auto-generated.
What's the difference between WindowsDefaultLocation and WindowsDefaultBounds?
WindowsDefaultLocation tells the form to start up at a location selected by OS, but with internally specified size. WindowsDefaultBounds delegates both size and starting position choices to the OS.
What's the difference between Move and LocationChanged? Resize and SizeChanged?
Both methods do the same, Move and Resize are the names adopted from VB to ease migration to C#.
How would you create a non-rectangular window, let's say an ellipse?
Create a rectangular form, set the TransparencyKey property to the same value as BackColor, which will effectively make the background of the form transparent. Then set the FormBorderStyle to FormBorderStyle.None, which will remove the contour and contents of the form.
How do you create a separator in the Menu Designer?
A hyphen '-' would do it. Also, an ampersand '&\' would underline the next letter.
How's anchoring different from docking?
Anchoring treats the component as having the absolute size and adjusts its location relative to the parent form. Docking treats the component location as absolute and disregards the component size. So if a status bar must always be at the bottom no matter what, use docking. If a button should be on the top right, but change its position with the form being resized, use anchoring.
How do you trigger the Paint event in System.Drawing?
Invalidate the current form; the OS will take care of repainting. The Update method forces the repaint.
With these events, why wouldn't Microsoft combine Invalidate and Paint, so that you wouldn't have to tell it to repaint, and then to force it to repaint?
Painting is the slowest thing the OS does, so usually telling it to repaint, but not forcing it allows for the process to take place in the background.
How can you assign an RGB color to a System.Drawing.Color object?
Call the static method FromArgb of this class and pass it the RGB values.
What class does Icon derive from?
Isn't it just a Bitmap with a wrapper name around it? No, Icon lives in System.Drawing namespace. It's not a Bitmap by default, and is treated separately by .NET. However, you can use ToBitmap method to get a valid Bitmap object from a valid Icon object.
Before in my VB app I would just load the icons from DLL. How can I load the icons provided by .NET dynamically?
By using System.Drawing.SystemIcons class, for example System.Drawing.SystemIcons.Warning produces an Icon with a warning sign in it.
When displaying fonts, what's the difference between pixels, points and ems?
A pixel is the lowest-resolution dot the computer monitor supports. Its size depends on user's settings and monitor size. A point is always 1/72 of an inch. An em is the number of pixels that it takes to display the letter M.
Best Interview Questions For Embedded Programmers »
1. What are static variables?
Variables that have only one copy per class are known as static variables. They are not attached to a particular instance of a class but rather belong to a class as a whole. They are declared by using the static keyword as a modifier. For example:
static type varIdentifier;
where, the name of the variable is varIdentifier and its data type is specified by type.
Static variables that are not explicitly initialized in the code are automatically initialized with a default value. The default value depends on the data type of the variables. The table given below shows the default values:
| Data Type | Initial Value |
| boolean | false |
| byte | 0 |
| short | 0 |
| int | 0 |
| long | 0L |
| char | 'u0000′ |
| float | 0.0F |
| double | 0.0D |
| Object reference | null |
2. What are volatile variables?
A volatile variable is modified asynchronously by concurrently running threads in a Java application.It is not allowed to have a local copy of a variable that is different from the value currently held in "main" memory. Effectively, a variable declared volatile must have it's data synchronized across all threads, so that whenever you access or update the variable in any thread, all other threads immediately see the same value. Of course, it is likely that volatile variables have a higher access and update overhead than "plain" variables, since the reason threads can have their own copy of data is for better efficiency.
3. What do you mean by const keyword?
4. What is interrupt latency?
Interrupt latency is the time between the generation of an interrupt by a device and the servicing of the device which generated the interrupt. For many operating systems, devices are serviced as soon as the device's interrupt handler is executed. Interrupt latency may be affected by interrupt controllers, interrupt masking, and the operating system's (OS) interrupt handling methods.
5. How you can optimize it?
6. What is size of character, integer, integer pointer, character pointer?
7. What is NULL pointer and what is its use?
A null pointer has a reserved value, often but not necessarily the value zero, indicating that it refers to no object. Null pointers are used routinely, particularly in C and C++ where the compile-time constant NULL is used, to represent conditions such as the lack of a successor to the last element of a linked list, while maintaining a consistent structure for the list nodes.
8. What is void pointer and what is its use?
A special pointer type called the "void pointer" points to an object of unspecified type and cannot be dereferenced. The address can be directly manipulated by casting a pointer to and from an integral type of sufficient size.
9. What is ISR?
Integrated Services Routers (ISRs) are Cisco router product series that integrates many functions into a single device. An example of such devices is a device that acts as both router and switch, and provides other functions as well.
10. What is return type of ISR?
Void
11. Can we use any function inside ISR?
12. Can we use printf inside ISR?
No we cannot use printf() in ISR because ISRs' are a part of kernel and kernel is not linked with libaray provided by C,so when we use printf() in ISR it should generate a linkage error.
13. Can we put breakpoint inside ISR?
14. How to decide whether given processor is using little endian format or big endian format?
15. What is Top half & bottom half of a kernel?
16. Difference between RISC and CISC processor.
RISC is designed with the philosophy that simplicity means fast, disregard the esoteric and combinatory cases.
CISC is designed in mind that if a procedure being designed into the CPU it would be faster compare to if it was written as software code.
17. What is RTOS?
A real-time operating system (RTOS) is an operating system that guarantees a certain capability within a specified time constraint. For example, an operating system might be designed to ensure that a certain object was available for a robot on an assembly line. In what is usually called a "hard" real-time operating system, if the calculation could not be performed for making the object available at the designated time, the operating system would terminate with a failure. In a "soft" real-time operating system, the assembly line would continue to function but the production output might be lower as objects failed to appear at their designated time, causing the robot to be temporarily unproductive. Some real-time operating systems are created for a special application and others are more general purpose. Some existing general purpose operating systems claim to be a real-time operating systems. To some extent, almost any general purpose operating system such as Microsoft's Windows 2000 or IBM's OS/390 can be evaluated for its real-time operating system qualities. That is, even if an operating system doesn't qualify, it may have characteristics that enable it to be considered as a solution to a particular real-time application problem.
In general, real-time operating systems are said to require:
* multitasking
* Process threads that can be prioritized
* A sufficient number of interrupt levels
Real-time operating systems are often required in small embedded operating systems that are packaged as part of micro devices. Some kernels can be considered to meet the requirements of a real-time operating system. However, since other components, such as device drivers, are also usually needed for a particular solution, a real-time operating system is usually larger than just the kernel.
18. What is the difference between hard real-time and soft real-time OS?
A hard real time system guarantees that critical tasks complete on time this goal requires that all delays in the system be bounded from the retrieval of the stored data to the time that it takes the o.s to finish any request made of it.
A soft real time system where a critical real time task gets priority over other tasks and retains that priority until it completes.As in hard real time system kernel delays need to be bounded.
19. What type of scheduling is there in RTOS?
In typical designs, a task has three states: 1) running, 2) ready, 3) blocked. Most tasks are blocked, most of the time. Only one task per CPU is running. In simpler systems, the ready list is usually short, two or three tasks at most.
The real key is designing the scheduler. Usually the data structure of the ready list in the scheduler is designed to minimize the worst-case length of time spent in the scheduler's critical section, during which preemption is inhibited, and, in some cases, all interrupts are disabled. But, the choice of data structure depends also on the maximum number of tasks that can be on the ready list.
20. What is priority inversion?
Priority inversion is a situation where in lower priority tasks will run blocking higher priority tasks waiting for resource (mutex). For ex: consider 3 tasks. A, B and C, A being highest priority task and C is lowest. Look at sequence of context swaps
A goes for I/O . unlocks mutex.
C was ready to run. So C starts running. locks mutex
B is ready to run. Swaps out C and takes mutex.
A is ready to run. but A is blocked as mutex is locked by B. but B will never relinqishes the mutex as its higher priority than C.
The solution to priority inversion is Priority inheritance.
21. What is priority inheritance?
Priority inheritance is a method for eliminating priority inversion problems. Using this programming method, a process scheduling algorithm will increase the priority of a process to the maximum priority of any process waiting for any resource on which the process has a resource lock.
The basic idea of the priority inheritance protocol is that when a job blocks one or more high priority jobs, it ignores its original priority assignment and executes its critical section at the highest priority level of all the jobs it blocks. After executing its critical section, the job returns to its original priority level.
22. How many types of IPC mechanism you know?
Local
Local IPC is for communication among process on a single machine. Local IPC is useful for data sharing, signaling, and synchronization.
Mutexes, semaphores, and events can be named, or unnamed (identified by handle) and can be protected by NT permissions.
Atoms
Atoms are globally available strings or integer values identified by a handle. Atoms were typically used for DDE. The global atom table is also limited to 37 strings total. I do not recommend the use of atoms as they seem to be outdated. Instead, other more up to date IPC mechanisms should be used.
Shared Memory
Shared memory is a block o f memory which multiple processes can access. Under Win16 all memory was accessible by any process so pointers could be just passed between processes. Win32 has memory protection mechanisms, and a processes memory is virtually mapped to that process. Win32 however can map a block of memory into multiple processes virtual memory spaces. Even though the shared block of memory may appear to be at different locations to each process, each will point to the same physical location in memory. In addition, this mechanism allows you to control which processes have access to shared memory blocks. Win32 can also map a disk file into virtual memory. Because of this, when shared memory is used, it is called a memory mapped file.
Win32 also does this to the code segment of executables. When multiple instances of an executable are loaded, only one copy of the code is loaded into physical memory, while it is mapped into multiple virtual spaces.
Mutexes
A mutex (Mutual Exclusion) is an object which can be owned, but only owned by a single thread at a time. Any other thread trying to gain ownership, will be blocked and queued in order of requests. Mutexes are used to control exclusive access to any global object, or non reentrant code. Mutexes can be used to control access to shared memory, hardware, or other single access items.
Semaphores
A semaphore is like a mutex, except that a specified number of threads can own a specific semaphore at one time. When the semaphore is created, this number is specified. Semaphores are typically used to limit access to resources. An example of this might be to prevent "thrashing" of a resource by setting the maximum number of threads which can concurrently access the object.
Critical Sections
Critical sections are similar to mutexes, however mutexes differ from critical sections in that they can be accessed across processes and threads, while a critical section, can only be access across threads from within the same process. Critical sections are also lighter weight, cannot be named, or have security attributes assigned to them.
Events
An event is an object which threads can wait for to be triggered. Any free thread may then trigger the event, which will then release the other waiting threads. An event can be used to hold threads from accessing something that has not been initialized or ready yet. They can also be used to signal that input is available, or a device is ready to accept more data.
Messages
Messages can be used to send a one way queued instructions/status to a single thread. You can send messages to an existing windows message queue, and filter them as they come in, or create your own queue within a secondary thread. Messages are good for non time critical communications, or to serialize handling. Messages can contain only a limited amount of data however. Each message can contain only one 16 bit integer, and one 32 bit integer. When communicating between threads, pointers may be passed in the 32 bit parameter. However when communicating between processes pointers may not be passed, even when the pointer identifies shared memory as each process may see the shared memory at a different location in it s virtual space. Object handles (Mutexes, semaphores, events) cannot be passed in the message data, however such handles can be duplicated, and the duplicated handles may be passed via the message data. (See DuplicateHandle)
DDE
DDE (Dynamic Data Exchange) was the common way to externally control applications in the 16 bit world. DDE is still used occasionally, however it has been strategically replaced by COM. You should use Com instead of DDE, unless the application you need to communicate with only understands DDE. DDE also tends to be slow, and the built in DDE in Delphi/C++ Builder is "less than perfect".
Clipboard
The clipboard can also be used for IPC, however in most situations it is not advisable as it is a global resource.
OLE/Com
OLE (Object Linking & Embedding) has evolved into COM (Component Object Model). COM allows you to do many things. With COM you can create language independent objects, expose interfaces from applications to allow external control, and much more. COM allows you to expose interfaces. An interface is a defined set of methods and properties which allow you to proxy calls to any code or object that you wish. An interface is like a contract. Any time that the interface is implemented, all of it s members must be implemented.
Network
Network IPC is for communication between processes on different machines.
Network Protocols
Network protocols allow you the most flexibility, however they bind you to a single protocol, and require a lot of extra programming. Most times you do not need this flexibility and it is better to use a higher level protocol. Network protocols are also lighter weight.
Some common protocols used for network communication are IPX/SPX (Novell), NetBEUI (Microsoft), and TCP/IP (Internet).
NetBios is also a protocol, but it is a slightly higher protocol than the others. It abstracts some of the features of the other network protocols while still providing you with most of their advantages. NetBios s main feature is that is does not bin you to a particular protocol which your network configuration and/or hardware may dictate. NetBios commonly runs on top of NetBEUI or TCP/IP.
If you do decide you need to work at the network protocol level, TCP/IP is probably your best bet. It is very flexible, in widespread use (The internet runs on it), works with any operating system, has tons of existing services, and has become the de facto standard.
Mailslots
Mailslots are like messages except that they can be sent across a network. Mailslots also differ from messages in that they are not arbitrarily limited in the amount of data they can contain, and mailslots can be broadcast to a group of receivers. Mailslots however are sent as datagrams, and therefore are not guaranteed to arrive at their destination. Mailslots are similar to TCP/IP s UDP mechanism, but at a slightly higher level. If delivery must be guaranteed, another method should be used.
Pipes
A pipe is a communication channel with two endpoints. Pipes are similar to TCP connections. Pipes however can be optionally named, and contain security attributes. Pipes can also be one or two way. Pipes are used both for network communication, and locally. For example, the console is a pipe. If you want to open a DOS session / command window, you can swap a pipe for it s standard in and standard out, thus giving your application full control of the window.
RPC
RPC (Remote Procedure Calls) allow you to make function/procedure calls in which the code actually executes on another system. RPCs are typically used with older systems, mainframes, or for implementing distributed object systems.
Distributed Objects
Distributed objects are used for communication among objects. These objects can be local or remote. This easily allows you to distribute your programs with complete abstraction of location. The two most common distributed object standards are DCom and Corba.
Without distributed object systems, developers need to implement their own protocols and also decide upon and program for a network transport. In many cases they also tie their protocol to a specific language, and even a platform. Distributed object systems abstract the user from all this and provide a high level interface which is platform independent, language independent, and network protocol independent.
DCom
DCom is just a distributed version of COM (Component Object Model). DCom is controlled by Microsoft and therefore is tied heavily to Win32 and other Microsoft technologies. The specification is available for other platforms, but is rarely used. For all intents and purposes, DCom is for WinTel only. DCom is also heavily tied to NT security. If you have lots of users that do not have NT accounts, this may pose a major headache for you. NT security can be bypassed by using the Midas socket server (I ve been told you do not need a Midas license to merely use this single component).
Corba
Corba (Common Object Request Broker Architecture) is a platform independent distributed object protocol. Corba is also implemented by many vendors including Inprise/Visigenic. This allows you to choose your implementation. The Corba standard is controlled by the OMG (Object Management Group).
23. What is semaphore?
In simple terms a Semaphore is a unit or resource which is used for synchronization between two processes , it is kind of flag (in abstract terms) which every process will check before processing ahead to avoid the deadlock situation
24. What is spin lock?
A spin lock is a lock where the thread simply waits in a loop ("spins") repeatedly checking until the lock becomes available. As the thread remains active but isn't performing a useful task, the use of such a lock is a kind of busy waiting. Once acquired, spin locks will usually be held until they are explicitly released, although in some implementations they may be automatically released if the thread blocks, or "goes to sleep".
25. What is difference between binary semaphore and mutex?
The differences are:
1) Mutex can be used only for mutual exclusion, while binary can be used of mutual exclusion as well as synchronisation.
2) Mutex can be given only by the task that took it.
3) Mutex cannot be given from an ISR.
4) Mutual-exclusion semaphores can be taken recursively. This means that the semaphore can be taken more than once by the task that holds it before finally being released.
5) Mutex provides a options for making the task that took it as DELETE_SAFE. This means, that the task cannot be deleted when it holds mutex.
26. What is virtual memory?
Virtual memory is a common part of most operating systems on desktop computers. It has become so common because it provides a big benefit for users at a very low cost.
Most computers today have something like 64 or 128 megabytes of RAM (random-access memory) available for use by the CPU (central processing unit). Often, that amount of RAM is not enough to run all of the programs that most users expect to run at once. For example, if you load the Windows operating system, an e-mail program, a Web browser and word processor into RAM simultaneously, 64 megabytes is not enough to hold it all. If there were no such thing as virtual memory, your computer would have to say, "Sorry, you cannot load any more applications. Please close an application to load a new one." With virtual memory, the computer can look for areas of RAM that have not been used recently and copy them onto the hard disk. This frees up space in RAM to load the new application. Because it does this automatically, you don't even know it is happening, and it makes your computer feel like is has unlimited RAM space even though it has only 32 megabytes installed. Because hard-disk space is so much cheaper than RAM chips, virtual memory also provides a nice economic benefit.
The area of the hard disk that stores the RAM image is called a page file. It holds pages of RAM on the hard disk, and the operating system moves data back and forth between the page file and RAM. (On a Windows machine, page files have a .SWP extension.)
Of course, the read/write speed of a hard drive is much slower than RAM, and the technology of a hard drive is not geared toward accessing small pieces of data at a time. If your system has to rely too heavily on virtual memory, you will notice a significant performance drop. The key is to have enough RAM to handle everything you tend to work on simultaneously. Then, the only time you "feel" the slowness of virtual memory is in the slight pause that occurs when you change tasks. When you have enough RAM for your needs, virtual memory works beautifully. When you don't, the operating system has to constantly swap information back and forth between RAM and the hard disk. This is called thrashing, and it can make your computer feel incredibly slow.
27. What is kernel paging?
28. Can structures be passed to the functions by value?
Yes structures can be passed to functions by value. Though it has two disadvatanges :
1) The chages by the calling function are not reflected
2) Its slower than the pass by refrence funcion call.
29. Why cannot arrays be passed by values to functions?
When a array is passed to a function, the array is internally changed to a 'pointer'. And pointers are always passed by reference.
30. Advantages and disadvantages of using macro and inline functions?
A macro is a constant that provides straight textual substitution where used, while an inline function is a procedure that is actually called each time. Macros do have a few advantages over inline functions, but the disadvantages are numerous. For example, type checking and argument validation is not performed in a macro, while they are in functions for the most part.
It is a matter that everyone should decide for themselves, but Bjarne Stroustrup, who created C++, advocates the use of inline functions over macros.
Inline functions are an imperative feature of C++ and are frequently used with classes. These are no different from the normal functions except for the fact that they are never actually called. These functions are, as their name suggests, expanded in line at each point of invocation. All that needs to be done to enable or cause a function to expand at the point of invocation is to add the inline keyword before the function definition.
31. What happens when recursion functions are declared inline?
An inline function replaces the call to the function by the body of the function, thus reducing the overhead of saving the context in stack. This is good for functions which are small in size and called occasionally. A recursive function calls an instance of it and thus can be a deeply nested. In this case if we define the recursive function as inline, it would replace every call to itself with the body of function and thus eating up a lot of code space.
32. #define cat(x,y) x##y concatenates x to y. But cat(cat(1,2),3) does not expand but gives preprocessor warning. Why?
Macro expanding becomes illegal if done recursively
Or
in this case the cat(x,y) is the macro which is defined by using the preprocessor directive , this will be substituted only at the place where it is called in this example it happens like this
cat(1,2)##3 which will once again become 1##2##3
here if we use ## in between we can join or concatenate only two variables that why it gives a preprocessor warning
33. Can you have constant volatile variable? Yes, you can have a volatile pointer?
You can have a constant pointer to a volatile variable but not a constant volatile variable.
Or
YES. We can have a const volatile variable.
a volatile variable is a variable which can be changed by the extrenal events (like an interrput timers will increment the voltile varible. If you dont want you volatile varibale to be changed then declare them as "const volatile".
Or
It is possible to have "const volatile" declaration. This indicates that the variable defined like this is not possible to change within that context. It can be changed by an external event. const declaraion just says that it will be readonly within the context, that area can be modified by an interrupt routine or another process.
34. ++*ip increments what? it increments what ip points to
I will explain this with an example:
int a = 10;
int *p = &a;
// suppose &a = 4010 (address of a)
Because both ++ and * are unary operators, the are calculated from right to left –> ++ (*p)
++*p will inrement 4010 by 4 (int size) -> ++*p will have the value 4014.
35. Operations involving unsigned and signed — unsigned will be converted to signed
Macro expanding becomes illegal if done recursively
36. Malloc (sizeof(0)) will return — valid pointer
yes. sizeof(0) –> int size and it is 4
37.main() {fork();fork();fork();printf("hello world"); } — will print 8 times.
It will print 8 times. Because, each fork will print twice.
if u flush, (using "fflush"), then it will be printed only once. thats is you need to flush the iostreams.
38. Array of pts to functions — void (*fptr[10])()
39. Which way of writing infinite loops is more efficient than others?
There are 3ways.
40. Who to know whether system uses big endian or little endian format and how to convert among them?
41. What are forward reference w.r.t. pointers in c?
42. How is generic list manipulation function written which accepts elements of any kind?
43. What is the difference between embedded systems and the system in which RTOS is running?
44. How can you define a structure with bit field members?
struct abc {
unsigned int a:1;
unisgned int b:2;
};
45. How do you write a function which takes 2 arguments - a byte and a field in the byte and returns the value of the field in that byte?
46. Which parameters decide the size of data type for a processor?
47. What is job of preprocessor, compiler, assembler and linker?
48. What is the difference between static linking and dynamic linking?
49. How to implement a WD timer in software?
Sample Networking Informational Interview Questions »
1. I have so many interests. How does one with a liberal arts education and diverse interests plan a career? What positions are good entry-level opportunities?
2. How will a liberal arts degree be an advantage in the world of work?
3. What are the benefits of a liberal arts degree in the short-term and long-term regarding career choices and advancement?
4. How does one market a liberal arts degree to employers?
5. How did this type of work interest you and how did you get started?
6. How did you get your first job? What jobs and experiences have led you to your present position?
7. Can you suggest some ways a student could obtain necessary experience?
8. If you could do things all over again, would you choose the same path for yourself? Why? What
would you change?
9. How has your job affected your lifestyle?
10. Would you recommend that I pursue a graduate degree?
11. Does your work relate to any experiences or studies you had in college?
12. How well did your college experience prepare you for your career?
13. What courses and experiences have proven to be the most valuable to you in your work? What would you recommend for me?
14. How important are grades/GPA for obtaining a job in this field?
15.How do you think my university's reputation is viewed when it comes to hiring?
16. How do you think graduation from a liberal arts university is viewed when it comes to hiring?
17. How did you prepare for this work? If you were entering this career today, would you change your preparation in any way to facilitate entry?
18. What abilities or personal qualities do you believe contribute most to success in this field/job?
19. What are the typical entry-level job titles and functions? What entry level jobs are best for learning as much as possible?
20. Do you have any advice for someone interested in this field/job? Are there any written materials you suggest I read?
21. Which professional journals and organizations would help me learn more about this field?
22. What kinds of experience, paid or unpaid, would you encourage for anybody pursuing a career in this field?
23. What special advice do you have for a student seeking to qualify for this position?
24. What particular skills or talents are most essential to be effective in your job? How did you learn these skills? Did you enter this position through a formal training program? How can I evaluate whether or not I have the necessary skills for a position such as yours?
25. Do you have any special words of encouragement or warnings as a result of your experiences?
26. These are my strongest assets (skills, areas of knowledge, personality traits and
values ) : ___________________________________ . Where would they fit in this field? Where would they be helpful in an organization? Where might they fit in other fields? Where might they be helpful in other organizations?
27. How would you assess the experience I've had so far in terms of entering this field?
28. Do you have any other networking advice for me?
Classic Job Interview Questions »
There are many typical questions in interview that can trick you up but with the bit of preplanned you can learn to answer with confidence
Here are some Typical Interview Questions
1. What is your biggest weakness?
The braided question which is best handled by picking something you have made protest step to address. For Example
1. Pick something you have regressed
2. Use a recent example
3. Weakness can be viewed as strength.
Note:
Dont say that i dont have any weakness do answer this question and always answer this question
2. Why should we hire you?
Here we need follow some steps
1. First of all, check the job description
2. I have a unique combination of strong technical skills and the ability to build long-term customer relationships.
3. Give a good recent examples.
4. Given the apportunity, i could bring this success to your company.
3. Why do you want the job?
1. Prepare the answer carefully. Give some good points.
2. Do your homework on the company
3. Match your goals to the company goals.
4. Tell me about yourself?
This often asked for everyone who goes to company for an interview. So prepare well for this question.
No comments:
Post a Comment