This section includes 7 InterviewSolutions, each offering curated multiple-choice questions to sharpen your Current Affairs knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What Is Concurrency? Explain With Example Deadlock And Starvation. |
|
Answer» Concurrency is nothing but execution of different transactions simultaneously on one single resource. if the system is priority based system then low priority thread never gets a chance.
Concurrency is nothing but execution of different transactions simultaneously on one single resource. if the system is priority based system then low priority thread never gets a chance.
|
|
| 2. |
Explain The Working Of Virtual Memory? |
|
Answer» Virtual memory is a computer system technique which gives an application program the impression that it has contiguous working memory (an address space), while in FACT it may be physically fragmented and may even overflow on to DISK storage. Systems that use this technique make programming of large applications easier and use REAL physical memory (e.g. RAM) more EFFICIENTLY than those without virtual memory. Virtual memory is a computer system technique which gives an application program the impression that it has contiguous working memory (an address space), while in fact it may be physically fragmented and may even overflow on to disk storage. Systems that use this technique make programming of large applications easier and use real physical memory (e.g. RAM) more efficiently than those without virtual memory. |
|
| 3. |
What Is A Inode? |
|
Answer» In computing, an inode is a DATA structure on a TRADITIONAL Unix-style file SYSTEM such as UFS. An inode stores BASIC information about a regular file, DIRECTORY, or other file system object. In computing, an inode is a data structure on a traditional Unix-style file system such as UFS. An inode stores basic information about a regular file, directory, or other file system object. |
|
| 4. |
Scope Of Static Variables? |
|
Answer» Scope of static VARIABLE is WITHIN the file if it is static GLOBAL. Scope of static variable is within the function if variable is declared local to a function. But the life time is THROUGHOUT the program. Scope of static variable is within the file if it is static global. Scope of static variable is within the function if variable is declared local to a function. But the life time is throughout the program. |
|
| 5. |
What Happens When Recursion Functions Are Declared Inline? |
|
Answer» It is ILLEGAL to declare a recursive function as inline. Even a function is DECLARED as inline compiler judges it to be inline or not. Many compilers can also inline EXPAND some recursive functions; recursive macros are typically illegal. It is illegal to declare a recursive function as inline. Even a function is declared as inline compiler judges it to be inline or not. Many compilers can also inline expand some recursive functions; recursive macros are typically illegal. |
|
| 6. |
Difference In Inline Functions And Macro |
Answer»
|
|
| 7. |
What Is Mutex? |
|
Answer» Mutual exclusion (often abbreviated to mutex) algorithms are USED in CONCURRENT PROGRAMMING to avoid the simultaneous use of a common resource, such as a global variable, by pieces of COMPUTER code called critical SECTIONS. Mutual exclusion (often abbreviated to mutex) algorithms are used in concurrent programming to avoid the simultaneous use of a common resource, such as a global variable, by pieces of computer code called critical sections. |
|
| 8. |
What Is Semaphore? |
|
Answer» In computer science, a semaphore is a protected variable or abstract data type which constitutes the CLASSIC method for restricting access to shared resources such as shared memory in a parallel programming environment. A counting semaphore is a counter for a set of AVAILABLE resources, rather than a locked/unlocked flag of a SINGLE RESOURCE. In computer science, a semaphore is a protected variable or abstract data type which constitutes the classic method for restricting access to shared resources such as shared memory in a parallel programming environment. A counting semaphore is a counter for a set of available resources, rather than a locked/unlocked flag of a single resource. |
|
| 9. |
What Is Watchdog Timer? |
|
Answer» A watchdog TIMER (or computer operating properly timer) is a computer HARDWARE timing device that triggers a system reset if the main program, due to some fault CONDITION, such as a hang, NEGLECTS to REGULARLY service the watchdog. The intention is to bring the system back from the hung state into normal operation. A watchdog timer (or computer operating properly timer) is a computer hardware timing device that triggers a system reset if the main program, due to some fault condition, such as a hang, neglects to regularly service the watchdog. The intention is to bring the system back from the hung state into normal operation. |
|
| 10. |
Explain Can Microcontroller Work Independently? |
|
Answer» Obviously, it can work independently. But to see the output we need certain output devices like LED, Buzzer can be CONNECTED to check its functionality. Without the HELP of any o/p DEVICE connected we can check the functionality of Microcontroller. Obviously, it can work independently. But to see the output we need certain output devices like LED, Buzzer can be connected to check its functionality. Without the help of any o/p device connected we can check the functionality of Microcontroller. |
|
| 11. |
While Writing Interrupt Handlers (isr), Which Are Points Needed To Be Considered? |
|
Answer» AVOID SLEEP, USE GFP_ATOMIC INSTEAD of GFP_KERNEL in kmalloc. Avoid sleep, use GFP_ATOMIC instead of GFP_KERNEL in kmalloc. |
|
| 12. |
What Is The Difference Between Testing And Verification Of Vlsi Circuit? |
| Answer» | |
| 13. |
What Is Dirac Delta Function And Its Fourier Transform And Its Importance? |
Answer»
|
|
| 14. |
Dma Deals With Which Address (physical/virtual Addresses)? |
|
Answer» DMA deals with Physical addresses.
DMA deals with Physical addresses. |
|
| 15. |
Can We Use Semaphore Or Mutex Or Spin Lock In Interrupt Context In Linux Kernel? |
|
Answer» We cannot sleep in interrupt CONTEXT so semaphores and mutex can't be USED. SPINLOCKS can be used for LOCKING in interrupt context. We cannot sleep in interrupt context so semaphores and mutex can't be used. Spinlocks can be used for locking in interrupt context. |
|
| 16. |
What Is Difference Between Micro Processor & Micro Controller? |
| Answer» | |
| 17. |
What Is Plc System? |
|
Answer» PROGRAMMING LOGICAL CONTROL SYSTEM. Programming logical control system. |
|
| 18. |
What Type Of Registers Contains An (intel) Cpu? |
|
Answer» Special function registers like accumulator, Program CONTROLLER(PC),data POINTER(DPTR),TMOD and TCON (TIMING registers),3 REGISTER banks with r0 to R7,Bit addressable registers like B. Special function registers like accumulator, Program controller(PC),data pointer(DPTR),TMOD and TCON (timing registers),3 register banks with r0 to r7,Bit addressable registers like B. |
|
| 19. |
What Is The Role Of Segment Register? |
|
Answer» In the x86 processor architecture, memory addresses are specified in two PARTS called the segment and the offset. One usually thinks of the segment as specifying the beginning of a block of memory allocated by the system and the offset as an index into it. Segment values are stored in the segment REGISTERS. There are four or more segment registers: CS contains the segment of the current instruction (IP is the offset), SS contains the stack segment (SP is the offset), DS is the segment used by default for most data operations, ES (and, in more RECENT processors, FS and GS) is an extra segment register. Most memory operations ACCEPT a segment override prefix that allows use of a segment register other than the default one. In the x86 processor architecture, memory addresses are specified in two parts called the segment and the offset. One usually thinks of the segment as specifying the beginning of a block of memory allocated by the system and the offset as an index into it. Segment values are stored in the segment registers. There are four or more segment registers: CS contains the segment of the current instruction (IP is the offset), SS contains the stack segment (SP is the offset), DS is the segment used by default for most data operations, ES (and, in more recent processors, FS and GS) is an extra segment register. Most memory operations accept a segment override prefix that allows use of a segment register other than the default one. |
|
| 20. |
Is 8085 An Embedded System? |
|
Answer» its not a EMBEDDED SYSTEM...because it will be a PART of a embedded system and it does not WORK on any SOFTWARE. its not a embedded system...because it will be a part of a embedded system and it does not work on any software. |
|
| 21. |
How To Implement A Fourth Order Butterworth Lp Filter At 1khz If Sampling Frequency Is 8 Khz? |
|
Answer» A FOURTH order Butterworth filter can be made as CASCADE of two second order LP filters with zeta of 0.924 and 0.383. ONE can use a bilinear transformation approach for REALIZING second order LP filters. Using this technique described WELL in many texts, one can make two second order LP filters and cascade them. A fourth order Butterworth filter can be made as cascade of two second order LP filters with zeta of 0.924 and 0.383. One can use a bilinear transformation approach for realizing second order LP filters. Using this technique described well in many texts, one can make two second order LP filters and cascade them. |
|
| 22. |
What Is An Anti Aliasing Filter? Why Is It Required? |
|
Answer» Anti aliasing filter reduces errors due to aliasing. If a SIGNAL is sampled at 8 kS/S, the max frequency of the input should be 4 kHz. Otherwise, aliasing errors will result. Typically a 3.4kHz will have an image of 4.6 khz, and one uses a sharp cut off filter with gain of about 1 at 3.4kHz and gain of about 0.01 at 4.6 kHz to effectively guard against aliasing. THUS one does not quite choose max frequency as simply fs/2 where fs is sampling frequency. One has to have a guard BAND of about 10% of this fmax, and CHOOSES max signal frequency as 0.9*fs/2. Anti aliasing filter reduces errors due to aliasing. If a signal is sampled at 8 kS/S, the max frequency of the input should be 4 kHz. Otherwise, aliasing errors will result. Typically a 3.4kHz will have an image of 4.6 khz, and one uses a sharp cut off filter with gain of about 1 at 3.4kHz and gain of about 0.01 at 4.6 kHz to effectively guard against aliasing. Thus one does not quite choose max frequency as simply fs/2 where fs is sampling frequency. One has to have a guard band of about 10% of this fmax, and chooses max signal frequency as 0.9*fs/2. |
|
| 23. |
Is It Necessary To Start The Execution Of A Program From The Main() In C? |
|
Answer» "Normally you are at LIBERTY to give functions WHATEVER names you like, but "main"' is SPECIAL - your program begins executing at the beginning of main. This means that every program must have a main SOMEWHERE." "Normally you are at liberty to give functions whatever names you like, but "main"' is special - your program begins executing at the beginning of main. This means that every program must have a main somewhere." |
|
| 24. |
What Is The Difference Between Fifo And The Memory? |
|
Answer» Fifo(First In Last Out) is a MEMORY structure where data can be STORED and retrieved (in the order of its entry only). This is a queue,wheras Memory is a STORAGE device which can HOLD data dynamically or at any DESIRED locations and can be retrieved in any order. Fifo(First In Last Out) is a memory structure where data can be stored and retrieved (in the order of its entry only). This is a queue,wheras Memory is a storage device which can hold data dynamically or at any desired locations and can be retrieved in any order. |
|
| 25. |
How To Define A Structure With Bit Field Members? |
|
Answer» You can define structure bit field members with Dot OPERATORS. You can define structure bit field members with Dot operators. |
|
| 26. |
How Is Function Itoa() Written In C? |
|
Answer» Answer : #include<stdlib.h> #include<stdio.h> INT MAIN() { int n = 6789; CHAR p[20]; ITOA(n,s,10); printf("n=%d,s=%s",n,s); return 0; } |
|
| 27. |
Explain What Is Forward Reference W.r.t. Pointers In C? |
|
Answer» <P>POINTER use's to REFERENCE to value a into int a=10 to memory add this value and 10 is add p value ADDED this DATA in memory location for p. Pointer use's to reference to value a into int a=10 to memory add this value and 10 is add p value added this data in memory location for p. |
|
| 28. |
Explain What Are The Different Storage Classes In C? |
|
Answer» FOUR types of storage classes are there in C. Four types of storage classes are there in c. |
|
| 29. |
Explain Can We Have Constant Volatile Variable? |
|
Answer» Const and volatile KEYWORDS should not be USED TOGETHER because both are opposite in nature. A VARIABLE is DECLARED as "const" means it's value is not able to be changed but if it is declared as "Volatile" then it is not under control. Const and volatile keywords should not be used together because both are opposite in nature. A variable is declared as "const" means it's value is not able to be changed but if it is declared as "Volatile" then it is not under control. |
|
| 30. |
Explain Can Structures Be Passed To The Functions By Value? |
|
Answer» Yes structures can be passed to functions by value. Though PASSING by value has two disadvantages: Yes structures can be passed to functions by value. Though passing by value has two disadvantages: |
|
| 31. |
Explain What Will This Return Malloc(sizeof(-10))? |
|
Answer» It will return a 4 byte ADDRESS value. It will return a 4 byte address value. |
|
| 32. |
Explain What Are The 5 Different Types Of Inheritance Relationship? |
|
Answer» 5 level types are as under:
5 level types are as under: |
|
| 33. |
Explain What Are The Different Qualifiers In C? |
|
Answer» 1) VOLATILE: 1) Volatile: |
|
| 34. |
Explain What Is Interrupt Latency? How Can We Reduce It? |
|
Answer» INTERRUPT LATENCY is the TIME required to RETURN from the interrupt service routine after tackling a particular interrupt. We can reduce it by writing smaller ISR routines. Interrupt latency is the time required to return from the interrupt service routine after tackling a particular interrupt. We can reduce it by writing smaller ISR routines. |
|
| 35. |
Explain Why Cannot Arrays Be Passed By Values To Functions? |
|
Answer» Because in C when you say the name of the array it means the address of the first element. In this when you call the function by passing the argument a actually &a[0](address of first element) gets passed. Hence it is IMPOSSIBLE to pass by value in C.
Because in C when you say the name of the array it means the address of the first element. In this when you call the function by passing the argument a actually &a[0](address of first element) gets passed. Hence it is impossible to pass by value in C.
|
|
| 36. |
What Are The Advantages And Disadvantages Of Using Macro And Inline Functions? |
|
Answer» Advantage: Advantage: |
|
| 37. |
Explain Difference Between Object Oriented And Object Based Languages? |
|
Answer» Object based languages doesn’t support Inheritance where as object ORIENTED supports. c# is a object oriented language because it supports inheritance and asp.net is not a language it is a technology. If the language supports only 3 features i;e (data ENCAPSULATION, data ABSTRACTION and polymorphism).then it is said to be object based programming language. If the language supports all the 4 features i;e (encapsulation, abstraction, polymorphism and also inheritance ) then it is said to be object oriented programming language. Object based languages doesn’t support Inheritance where as object oriented supports. c# is a object oriented language because it supports inheritance and asp.net is not a language it is a technology. If the language supports only 3 features i;e (data encapsulation, data abstraction and polymorphism).then it is said to be object based programming language. If the language supports all the 4 features i;e (encapsulation, abstraction, polymorphism and also inheritance ) then it is said to be object oriented programming language. |
|
| 38. |
Explain Order Of Constructor And Destructor Call In Case Of Multiple Inheritance? |
|
Answer» constructors top-down, destructors bottom-up.
constructors top-down, destructors bottom-up. |
|
| 39. |
Explain Scope Of Static Variables? |
| Answer» | |
| 40. |
Explain What Happens When Recursion Functions Are Declared Inline? |
|
Answer» Inline functions property says whenever it will called, it will copy the complete DEFINITION of that function. RECURSIVE function declared as inline creates the BURDEN on the COMPILERS execution. The SIZE of the stack may/may not be overflow if the function size is big. Inline functions property says whenever it will called, it will copy the complete definition of that function. Recursive function declared as inline creates the burden on the compilers execution. The size of the stack may/may not be overflow if the function size is big. |
|
| 41. |
Accessing Fixed Memory Locations? |
|
Answer» Embedded systems are OFTEN characterized by requiring the programmer to access a specific memory LOCATION. On a certain project it is required to set an integer variable at the absolute address 0x67a9 to the value 0xaa55. The compiler is a pure ANSI compiler. Write code to accomplish this task. A more OBSCURE approach is: *(int * const)(0x67a9) = 0xaa55;Embedded systems are often characterized by requiring the programmer to access a specific memory location. On a certain project it is required to set an integer variable at the absolute address 0x67a9 to the value 0xaa55. The compiler is a pure ANSI compiler. Write code to accomplish this task. A more obscure approach is: |
|
| 42. |
Data Declarations? |
|
Answer» Examples of DATA declarations: a) INT a; Examples of data declarations: a) int a; |
|
| 43. |
Infinite Loops Often Arise In Embedded Systems. How Does You Code An Infinite Loop In C? |
|
Answer» There are SEVERAL solutions to this question. One is, while(1) { }Other is using for loop, but here things are not PRETTY clear as to what is going on. for(;;) { }Even though both serve the same purpose, its always better to KNOW why you are using the first or second. So when you are asked about such questions you must answer with confidence that both are right, and just matter which WAY you wish to code it, anyways finally compiler would optimize and generate the same code for it. So don’t ever say, I was taught to do it this way, and so never thought about the other ways. There are several solutions to this question. One is, Other is using for loop, but here things are not pretty clear as to what is going on. Even though both serve the same purpose, its always better to know why you are using the first or second. So when you are asked about such questions you must answer with confidence that both are right, and just matter which way you wish to code it, anyways finally compiler would optimize and generate the same code for it. So don’t ever say, I was taught to do it this way, and so never thought about the other ways. |
|
| 44. |
What Is A Pure Function In Arm Terminology? |
|
Answer» Pure functions are those which RETURN a result which depends only on their arguments. They can be THOUGHT of as mathematical functions: they always return the same result if the arguments are the same. To tell the compiler that a function is pure, use the special DECLARATION keyword __pure. __pure int square(int X) { return x * x; }Pure functions are those which return a result which depends only on their arguments. They can be thought of as mathematical functions: they always return the same result if the arguments are the same. To tell the compiler that a function is pure, use the special declaration keyword __pure. |
|
| 45. |
How To Reduce Function Call Overhead In Arm Based Systems |
Answer»
|
|
| 46. |
Which Is Better A Char, Short Or Int Type For Optimization? |
|
Answer» Where possible, it is best to avoid using char and short as local variables. For the types char and short the compiler needs to reduce the size of the local variable to 8 or 16 bits after each assignment. This is called sign-extending for SIGNED variables and zero extending for unsigned variables. It is implemented by shifting the register left by 24 or 16 bits, FOLLOWED by a signed or unsigned shift right by the same AMOUNT, taking two instructions (zero-extension of an unsigned char takes one instruction). Where possible, it is best to avoid using char and short as local variables. For the types char and short the compiler needs to reduce the size of the local variable to 8 or 16 bits after each assignment. This is called sign-extending for signed variables and zero extending for unsigned variables. It is implemented by shifting the register left by 24 or 16 bits, followed by a signed or unsigned shift right by the same amount, taking two instructions (zero-extension of an unsigned char takes one instruction). |
|
| 47. |
How Are Local And Global Variables Are Allocated By Compiler. |
|
Answer» Normally, cpu registers are allocated for local variables, but if the address of that local variable is used by some code, then it won’t ALLOCATE register but access from memory, THUS result in un-optimized code. Gobal variables always use memory, so access is slower, so always use global only when it is absolutely NECESSARY. Normally, cpu registers are allocated for local variables, but if the address of that local variable is used by some code, then it won’t allocate register but access from memory, thus result in un-optimized code. Gobal variables always use memory, so access is slower, so always use global only when it is absolutely necessary. |
|
| 48. |
What Is Loop Unrolling? |
|
Answer» Small loops can be unrolled for higher performance, with the disadvantage of increased codesize. When a LOOP is unrolled, a loop counter needs to be updated LESS often and fewer branches are executed. If the loop iterates only a few times, it can be fully unrolled, so that the loop overhead completely disappears. int CountBitOne(uint n) { int bits = 0; while (n != 0) { if (n & 1) bits++; n >> = 1; } return bits; } int CountBitOne(uint n) { int bits = 0; while (n != 0) { if (n & 1) bits++; if (n & 2) bits++; if (n & 4) bits++; if (n & 8) bits++; n >> = 4; } return bits; }Small loops can be unrolled for higher performance, with the disadvantage of increased codesize. When a loop is unrolled, a loop counter needs to be updated less often and fewer branches are executed. If the loop iterates only a few times, it can be fully unrolled, so that the loop overhead completely disappears. |
|
| 49. |
Which Is The Best Way To Write Loops? |
|
Answer» The best way is to write count down loops and compiler can generate better machine code for it than the count up loops. In count down at loop TERMINATION, it NEEDS to generate one INSTRUCTION (SUBS), which SUBTRACTS as well as check the zero flag, but in count up case it has to add and compare with a constant, which takes TWO instructions. The best way is to write count down loops and compiler can generate better machine code for it than the count up loops. In count down at loop termination, it needs to generate one instruction (SUBS), which subtracts as well as check the zero flag, but in count up case it has to add and compare with a constant, which takes two instructions. |
|
| 50. |
What Is A 'const' Variable? |
|
Answer» In simple terms 'const' MEANS 'read only'. Its value is not changed by any part of the code executed. So COMPILER can optimize by taking this info, and also it will GIVE WARNING when user TRY to change the value of this variable by mistake. In simple terms 'const' means 'read only'. Its value is not changed by any part of the code executed. So compiler can optimize by taking this info, and also it will give warning when user try to change the value of this variable by mistake. |
|