Question 1. What Is The Difference Between Embedded Systems And The System In Which Rtos Is Running?
Embedded system is simply aggregate of s/w and h/w this is a few embedded system can also have os some might not and rtos is an os.
Embedded machine can include RTOS and can not encompass additionally. It depends at the requirement. If the machine wishes to serve handiest event sequentially, there's no want of RTOS. If the machine needs the parallel execution of activities then we need RTOS.
Question 2. What Is Pass By Value And Pass By Reference? How Are Structure Passed As Arguments?
The parameter to a characteristic can be a copy of a cost that is represented by means of variable or may be a connection with a memory space that stores fee of variable. The former is referred to as bypass by way of fee and the latter is called skip by using reference. The distinction is that when parameters are surpassed by using value the adjustments made to the variable value within the function isn't always meditated in the caller function, but when surpassed as reference changes are meditated out of doors the called function. The structures are continually handed with the aid of reference.
Linux Embedded systems Interview Questions
Question 3. What Is Difference Between Using A Macro And Inline Function?
The macro are simply symbolic representations and cannot include statistics kind differentiations inside the parameters that we provide. The inline functions will have the facts kinds too defined as a part of them. The downside in using each is that the inclusion of condition tests may lead to increase in code area if the feature is called many times.
Question 4. What Is The Volatile Keyword Used For?
The unstable key-word is used to symbolize variables that point to memory in different mapped gadgets. In such a case the price of the variable can be changed out of doors of a program. The compiler does now not do additional optimizations to the code if there's unstable keyword.
Linux Embedded systems Tutorial
Question 5. What Are Hard And Soft Real Time Systems?
The difficult real time systems are the one that rely upon the output very strictly on time. Any past due reaction or put off can't be tolerated and could constantly be taken into consideration a failure. The tender actual time structures on the alternative aren't very rigid because the difficult actual time structures. The overall performance of the device degrades with the lateness of response, however it is bearable and can be optimized to a certain degree for reuse of the result.
Red Hat Linux Essentials Interview Questions
Question 6. What Is A Semaphore? What Are The Different Types Of Semaphore?
The semaphore is an summary records shop that is used to manipulate aid accesses throughout the numerous threads of execution or across specific approaches. There are sorts of semaphores:
• The binary semaphore that can take handiest 0,1 values. (used when there is competition for a unmarried useful resource entity).
• The counting semaphore that can take incremental values to certain restrict (used whilst wide variety of assets is confined).
Question 7. Write A Constant Time Consuming Statement Lot Finding Out If A Given Number Is A Power Of 2?
If n is the given range, then the expression (n & (n-1)) = zero gives the logical output depicting if it's far a electricity of two or not, if (n & (n-1) == 0) printf (“The given range is a power of two”);
Unix/Linux Tutorial Red Hat Linux System Administration Interview Questions
Question 8. What Are Recursive Functions? Can We Make Them Inline?
The recursive functions refer to the functions which make calls to itself earlier than giving out the final result. These may be declared as in-line capabilities and the compiler will allocate the reminiscence space supposed for the first name of the characteristic.
Question nine. What Is The Size Of The Int, Char And Float Data Types?
The size of the char and int are constantly depending on the underlying operating gadget or firmware. This is confined to the range of deal with lines in the deal with bus. The int typically takes up a cost of two bytes or 4 bytes. The char can soak up a space of 1 or 2 bytes. The go with the flow statistics kind takes up a fee of 4 bytes.
Ubuntu Certified Professional Interview Questions
Question 10. What Does Malloc Do? What Will Happen If We Have A Statement Like Malloc(sizeof(zero));
Malloc is the function this is used for dynamically allocating reminiscence to the distinctive variables. The malloc returns a reminiscence pointer of void kind (void *). The declaration malloc(sizeof(0)) returns a valid integer pointer because sizeof(0) represents the size of reminiscence taken up with the aid of the integer cost of zero. The reminiscence allocated through reminiscence is not routinely wiped clean up with the aid of the compiler after execution of the capabilities and must be wiped clean up by the programmer the use of the loose() feature.
Question 11. What Is Meant By A Forward Reference In C?
The forward reference refers to the case when we factor an deal with space of a smaller records kind with a pointer of a bigger records type. This may be pictured as allocating memory in unmarried bytes and having access to it with integer pointer as chunks of four.
IBM AIX Interview Questions
Question 12. What Is The Order Of Calling For The Constructors And Destructors In Case Of Objects Of Inherited Classes?
The constructors are known as with base magnificence first order and the destructors are called within the baby first order. That is, the if we have 2 degrees of inheritance A (base)-> B (inherit 1)-> C (inherit 2) then the constructor A is known as first accompanied through B and C. The C destructor is known as first followed by way of B and A.
Linux Embedded structures Interview Questions
Question 13. Explain The Properties Of A Object Oriented Programming Language.
Encapsulation: The statistics which can be related to the specific object are contained in the object shape and hidden from the alternative entities of the environment.
Polymorphism: The mechanism through which the identical pointer can confer with different forms of objects, which can be essentially related with the aid of some everyday commonality.
Abstraction: Hiding the information and implementation information from the real items. The framework of reference is still gift to be used by the alternative objects.
Inheritance: The way to take out the not unusual features and feature them as separate item entities best to be reused through the alternative items in a modular fashion.
Question 14. What Do You Mean By Interrupt Latency?
Interrupt latency refers to the time taken for the device to start the handler for the precise interrupt. The time from the time of arrival of interrupt to the time it's far being dealt with.
Question 15. What Typecast Is Applied When We Have A Signed And An Unsigned Int In An Expression?
The unsigned int is typecast into the signed cost.
Solaris Interview Questions
Question sixteen. How Are Variables Mapped Across To The Various Memories By The C Compiler?
The compiler keeps the image table which has the associated information of all of the variable names together with the duration of the allocated space, the access unit period for the pointer (kind of pointer) and the beginning cope with of the reminiscence area.
Question 17. What Is A Memory Leak? What Is A Segmentation Fault?
The memory leak refers to the uncleared memory may additionally builds up throughout life of the system. When it comes to a massive fee gadget stalls its execution because of unavailability of the memory. The segmentation fault then again refers to circumstance whilst our software attempts to get entry to a memory area that has already been freed up.
HP-ux 11iv3 system administration Interview Questions
Question 18. What Is Isr? Can They Be Passed Any Parameter And Can They Return A Value?
ISR refers back to the Interrupt Service Routines. These are strategies saved at precise reminiscence addresses which can be referred to as while sure type of interrupt occurs. The ISRs can't return a value and that they can not be surpassed any parameters.
Red Hat Linux Essentials Interview Questions
Question 19. A=7; B=eight; X=a++-b; Printf("%d", X ); What Does This Code Give As Output?
The compiler knows the announcement expression a--b with the aid of setting out as lots operators because it makes feel to a variable. So (a++) is taken as a parameter after which the expression turns into eight-eight which in flip gives the x fee as zero. Thus the output value is zero.
Question 20. What Are Little Endian And Big Endian Types Of Storage? How Can You Identify Which Type Of Allocation A System Follows?
The little endian memory illustration allocates the least address to the least good sized bit and the huge endian is where the highest huge bit takes up the least addressed reminiscence area. We can perceive the system’s utilization by defining an integer fee and having access to it as a character.
if(* (char *) &p == 0x2) printf (“little endiann”);
else printf (“massive endiann”);
Red Hat cluster Interview Questions
Question 21. What Is The Scope Of A Function That Is Declared As Static?
The static function when declared within a specific module is scoped most effective in that module and may only be accessed from it.
Question 22. What Is The Use Of Having The Const Qualifier?
The const qualifier identifies a selected parameter or variable as examine-best attribute to the function or to the whole software. This can come in handy while we're managing static statistics inner feature and in a program.
Question 23. Why Do We Need A Infinite Loop In Embedded Systems Development? What Are The Different Ways By Which You Can Code In A Infinite Loop?
The infinite loops are coded in to give a delay or sleep to the program execution for a particular quantity of clock ticks. They can be implemented as:
Embedded C Interview Questions
Question 24. What Is A 'unstable' Variable?
Volatile is a key-word to specify the compiler that this variable value can alternate any time, so compiler have to usually read its value from its cope with, and now not to apply temporary registers to save its cost and use in later part of the code. This is in particular essential to address the reminiscence mapped registers that are mapped as some variables or systems in embedded systems, together with hardware reputation registers etc, whose price may be changed every time, depending at the hardware nation.
Examples of unstable variables are,
• Hardware registers in peripherals (for example, repute registers)
• Non-computerized variables referenced inside an interrupt provider recurring
• Variables shared with the aid of multiple duties in a multi-threaded utility
Red Hat Linux System Administration Interview Questions
Question 25. Can A Volatile Be Constant?
unstable const a;
Yes it is able to be, it method that, it may be adjustments by hardware nation change, however its examine best sign in in hardware, so code ought to no longer try to regulate it.
Question 26. Can A Pointer Be Volatile ?
Yes, although this is not very common. An instance is when an interrupt service recurring modifies a pointer to a buffer.
Unix/Linux Interview Questions
Question 27. What Is A 'const' Variable?
In simple phrases 'const' means 'examine simplest'. Its value isn't always modified by means of any a part of the code accomplished. So compiler can optimize with the aid of taking this info, and also it's going to give warning while person try and alternate the fee of this variable by way of mistake.
Ubuntu Certified Professional Interview Questions
Question 28. Which Is The Best Way To Write Loops?
The exceptional way is to jot down remember down loops and compiler can generate higher gadget code for it than the matter up loops. In be counted down at loop termination, it needs to generate one training (SUBS), which subtracts as well as check the 0 flag, but in count number up case it has to feature and compare with a consistent, which takes commands.
Question 29. What Is Loop Unrolling?
Small loops can be unrolled for better performance, with the downside of elevated codesize. When a loop is unrolled, a loop counter needs to be up to date much less regularly and fewer branches are finished. If the loop iterates only a few times, it is able to be absolutely unrolled, in order that the loop overhead absolutely disappears.
Int CountBitOne(uint n)
int bits = 0;
at the same time as (n != 0)
if (n & 1) bits++;
n >> = 1;
go back bits;
int CountBitOne(uint n)
int bits = 0;
even as (n != zero)
if (n & 1) bits++;
if (n & 2) bits++;
if (n & four) bits++;
if (n & 8) bits++;
n >> = 4;
go back bits;
Unix Shell Scripting Interview Questions
Question 30. How Are Local And Global Variables Are Allocated By Compiler.
Normally, cpu registers are allocated for local variables, however if the deal with of that nearby variable is utilized by some code, then it won’t allocate sign up however get entry to from memory, for this reason bring about un-optimized code. Gobal variables constantly use reminiscence, so access is slower, so always use global best whilst it's miles honestly important.
Question 31. Which Is Better A Char, Short Or Int Type For Optimization?
Where possible, it's far exceptional to keep away from using char and brief as neighborhood variables. For the sorts char and quick the compiler desires to lessen the dimensions of the local variable to eight or 16 bits after every assignment. This is referred to as sign-extending for signed variables and 0 extending for unsigned variables. It is carried out by shifting the sign up left by 24 or sixteen bits, followed by using a signed or unsigned shift right by using the identical amount, taking instructions (0-extension of an unsigned char takes one coaching).
These shifts can be prevented by using int and unsigned int for neighborhood variables. This is in particular vital for calculations which first load statistics into neighborhood variables after which technique the statistics inside the local variables. Even if data is enter and output as eight- or 16-bit quantities, it's miles worth considering processing them as 32bit quantities
Question 32. How To Reduce Function Call Overhead In Arm Based Systems
Try to make sure that small capabilities take four or fewer arguments. These will now not use the stack for argument passing. It will reproduction into registers.
If a function needs extra than 4 arguments, try to ensure that it does a enormous quantity of work, so that the cost of passing the stacked arguments is outweighed.
Pass recommendations to systems as opposed to passing the structure itself.
Put associated arguments in a shape, and pass a pointer to the shape to features. This will reduce the range of parameters and increase readability.
Minimize the quantity of long long parameters, as these take argument words. This additionally applies to doubles if software program floating-point is enabled.
Avoid features with a parameter this is handed partially in a sign up and partly on the stack (split-argument). This isn't treated effectively via the cutting-edge compilers: all register arguments are pushed at the stack.
Avoid functions with a variable quantity of parameters. Varargs features.
Solaris Administrator Interview Questions
Question 33. What Is A Pure Function In Arm Terminology?
Pure capabilities are those which go back a end result which depends best on their arguments. They can be thought of as mathematical functions: they always return the equal end result if the arguments are the equal. To inform the compiler that a feature is pure, use the unique statement key-word __pure.
__pure int rectangular(int x)
go back x * x;
IBM AIX Interview Questions
Question 34. What Are Inline Functions?
The ARM compilers help inline capabilities with the keyword __inline. This outcomes in each name to an inline function being substituted with the aid of its frame, in place of a ordinary call. This effects in quicker code, but it adversely influences code length, mainly if the inline function is large and used regularly.
Question 35. Infinite Loops Often Arise In Embedded Systems. How Does You Code An Infinite Loop In C?
There are numerous solutions to this query. One is,
at the same time as(1)
Other is using for loop, but here matters are not pretty clean as to what is occurring.
Even though each serve the same motive, its always higher to know why you are the use of the first or 2d. So while you are requested about such questions you need to answer with self assurance that each are proper, and just count number which way you wish to code it, in any case ultimately compiler might optimize and generate the identical code for it. So don’t ever say, I changed into taught to do it this manner, and so never concept about the opposite methods.
There is some other way of doing it, i.E. With the aid of the usage of goto declaration, goto could be very basic keyword, that is greater like an meeting leap practise, if one unearths more comfy with goto then in all likelihood he works intently with meeting language, or with FORATN.
Question 36. Data Declarations?
Examples of data declarations:
a) int a;
b) int *a;
A pointer to an integer
c) int **a;
A pointer to a pointer to an integer
d) int a;
An array of 10 integers
e) int *a;
An array of 10 pointers to integers
f) int (*a);
A pointer to an array of 10 integers
g) int (*a)(int);
A pointer to a function a that takes an integer argument and returns an integer
h) int (*a)(int);
An array of 10 tips to features that take an integer argument and go back an integer
Solaris Interview Questions
Question 37. What Are The Uses Of The Keyword Static?
A variable declared static within the frame of a feature continues its cost among characteristic invocations .
A variable declared static within a module, (however outdoor the body of a characteristic) is out there through all functions within that module. It is not on hand through functions inside some other module. That is, it is a localized international.
Functions declared static within a module can also most effective be known as by using different functions within that module. That is, the scope of the feature is localized to the module inside which it is declared.
Question 38. Accessing Fixed Memory Locations?
Embedded systems are often characterised by requiring the programmer to get admission to a specific reminiscence location. On a sure venture it's miles required to set an integer variable at the absolute deal with 0x67a9 to the cost 0xaa55. The compiler is a pure ANSI compiler. Write code to perform this venture.
This hassle checks whether you know that it is legal to typecast an integer to a pointer that allows you to get entry to an absolute area. The specific syntax varies relying upon one's style. However, I might typically be seeking out something like this:
ptr = (int *)0x67a9;
*ptr = 0xaa55;
A more obscure technique is:
*(int * const)(0x67a9) = 0xaa55;
Question 39. Explain What Happens When Recursion Functions Are Declared Inline?
Inline functions property says every time it'll known as, it'll reproduction the entire definition of that function. Recursive function declared as inline creates the load on the compilers execution. The size of the stack may also/may not be overflow if the feature length is large.
Question 40. Explain Scope Of Static Variables?
Static variables can most effective be accessed within the documents had been they're declared.
Static variable in the scope of a characteristic save it's values in consecutive calls of that function.
Static features can handiest be known as inside the document they are described.
HP-ux 11iv3 machine management Interview Questions
Question forty one. What Is Interrupt Latency?
Interrupt latency refers to the amount of time between whilst an interrupt is brought on and when the interrupt is seen by way of software.
Question forty two. Explain Order Of Constructor And Destructor Call In Case Of Multiple Inheritance?
constructors pinnacle-down, destructors backside-up.
in parent's constructor
in toddler's constructor
in grandchild's constructor
in grandchild's destructor
in child's destructor
in discern's destructor
Red Hat cluster Interview Questions
Question forty three. Explain Difference Between Object Oriented And Object Based Languages?
Object based languages doesn’t aid Inheritance wherein as object oriented helps. C# is a item orientated language as it supports inheritance and asp.Internet isn't always a language it's miles a technology. If the language helps best 3 capabilities i;e (statistics encapsulation, data abstraction and polymorphism).Then it's miles said to be item based totally programming language. If the language helps all the four features i;e (encapsulation, abstraction, polymorphism and also inheritance ) then it's miles said to be object orientated programming language.
Question forty four. What Are The Advantages And Disadvantages Of Using Macro And Inline Functions?
Macros and Inline capabilities are efficient than calling a everyday characteristic. The instances spend in calling the function is saved in case of macros and inline features as these are included without delay into the code.
Macros and inline capabilities increased the scale of executable code.
Question 45. Explain Why Cannot Arrays Be Passed By Values To Functions?
Because in C while you say the name of the array it way the cope with of the first element.
int func(int a);
In this whilst you name the feature by means of passing the argument a absolutely &a(deal with of first element) receives passed. Hence it's far not possible to skip with the aid of cost in C.
Question forty six. Explain What Is Interrupt Latency? How Can We Reduce It?
Interrupt latency is the time required to return from the interrupt provider routine after tackling a selected interrupt. We can reduce it by means of writing smaller ISR exercises.
Question 47. Explain What Are The Different Qualifiers In C?
A variable must be declared volatile every time its cost could change suddenly. In practice, only three sorts of variables ought to change:
? Memory-mapped peripheral registers
? Global variables changed by way of an interrupt carrier routine
? Global variables within a multi-threaded application
The addition of a 'const' qualifier indicates that the (applicable a part of the) application won't regulate the variable.
Question forty eight. Explain What Are The 5 Different Types Of Inheritance Relationship?
5 degree sorts are as underneath:
unmarried: B derived from A.
Multilevel: derived from B and B derived from A.
More than one: C derived from A and B.
Hierarchical: B derived from A and C derived from A.
Hybrid: aggregate of above sorts.
Question 49. Explain What Will This Return Malloc(sizeof(-10))?
It will go back a four byte deal with cost.
Because -10 is a signed integer(varies from compiler to compiler).
Question 50. Explain Can Structures Be Passed To The Functions By Value?
Yes systems can be handed to features with the aid of cost. Though passing by way of price has risks:
1) The prices by way of the calling feature are not contemplated.
2) It’s slower than the bypass through reference function call.
Question 51. Explain Can We Have Constant Volatile Variable?
Const and volatile key phrases have to not be used collectively due to the fact each are contrary in nature. A variable is said as "const" method it is price isn't capable of be changed however if it's far declared as "Volatile" then it isn't always beneath manage.
Question fifty two. Explain What Are The Different Storage Classes In C?
Four types of garage lessons are there in c.
4.Extern or Global
Question 53. Explain What Is Forward Reference W.R.T. Pointers In C?
Pointer use's to connection with cost a into int a=10 to reminiscence upload this value and 10 is add p value introduced this information in memory place for p.
Question 54. How Is Function Itoa() Written In C?
int n = 6789;
go back zero;
Question 55. How To Define A Structure With Bit Field Members?
You can outline shape bit area individuals with Dot operators.
Int x.Four; // it allocates most effective 4 bits to x
Char C.6; // it allocates only 6 bits to C;
Question fifty six. What Is The Difference Between Fifo And The Memory?
Fifo(First In Last Out) is a memory shape in which facts may be saved and retrieved (in the order of its entry best). This is a queue,wheras Memory is a garage device that can maintain statistics dynamically or at any desired locations and may be retrieved in any order.
Question 57. Is It Necessary To Start The Execution Of A Program From The Main() In C?
"Normally you're at liberty to provide capabilities some thing names you want, but "important"' is special - your software starts offevolved executing at the beginning of major. This manner that each software ought to have a major somewhere."
Question 58. What Is An Anti Aliasing Filter? Why Is It Required?
Anti aliasing filter out reduces mistakes due to aliasing. If a sign is sampled at eight kS/S, the max frequency of the input have to be four kHz. Otherwise, aliasing mistakes will end result. Typically a 3.4kHz may have an photo of four.6 khz, and one makes use of a sharp reduce off filter with gain of approximately 1 at three.4kHz and advantage of about 0.01 at four.6 kHz to efficaciously guard towards aliasing. Thus one does no longer pretty pick out max frequency as really fs/2 in which fs is sampling frequency. One has to have a shield band of approximately 10% of this fmax, and chooses max sign frequency as 0.Nine*fs/2.
Question 59. How To Implement A Fourth Order Butterworth Lp Filter At 1khz If Sampling Frequency Is 8 Khz?
A fourth order Butterworth filter may be made as cascade of 2d 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 could make two 2d order LP filters and cascade them.
Question 60. Is 8085 An Embedded System?
its not a embedded machine...Because it might be part of a embedded system and it does not paintings on any software.
Question sixty one. What Is The Role Of Segment Register?
In the x86 processor structure, reminiscence addresses are laid out in components called the phase and the offset. One typically thinks of the section as specifying the beginning of a block of reminiscence allocated by way of the system and the offset as an index into it. Segment values are stored inside the segment registers. There are four or more segment registers: CS consists of the section of the cutting-edge training (IP is the offset), SS carries the stack section (SP is the offset), DS is the phase used by default for maximum statistics operations, ES (and, in greater latest processors, FS and GS) is an extra segment sign up. Most reminiscence operations take delivery of a segment override prefix that allows use of a section sign in apart from the default one.
Question 62. What Type Of Registers Contains An (intel) Cpu?
Special characteristic registers like accumulator, Program controller(PC),records pointer(DPTR),TMOD and TCON (timing registers),three sign in banks with r0 to r7,Bit addressable registers like B.
Question sixty three. What Is Plc System?
Programming logical manage machine.
Question sixty four. What Is Difference Between Micro Processor & Micro Controller?
Microprocessor is a manager of the assets (I/O, Memory) which lie out-facet of its architecture.
Micro-controllers have I/O, Memory and so on. Constructed into it and particularly designed for Control packages.
Question 65. Can We Use Semaphore Or Mutex Or Spin Lock In Interrupt Context In Linux Kernel?
We can not sleep in interrupt context so semaphores and mutex cannot be used. Spinlocks can be used for locking in interrupt context.
Question sixty six. Dma Deals With Which Address (physical/virtual Addresses)?
DMA offers with Physical addresses.
Only while CPU accesses addresses it refers to MMU(Memory Management Unit) and MMU converts the Physical address to Virtual deal with.
But, DMA controller is a device which without delay drives the statistics and address bus for the duration of statistics switch. So, it's far only Physical deal with. (It by no means desires to go through MMU & Virtual addresses).
That is why when writing the tool drivers, the physical address of the records buffer needs to be assigned to the DMA.
Question sixty seven. What Is Dirac Delta Function And Its Fourier Transform And Its Importance?
Dirac delta is a continuous time feature with unit region and endless amplitude at t=0 the fourier rework of dirac delta is 1.
The usage of dirac delta as an input to the machine, we can get the gadget response. It's far used to observe the conduct of the circuit.
We will use this gadget conduct to find the output for any enter.
Question sixty eight. What Is The Difference Between Testing And Verification Of Vlsi Circuit?
Verification is a the front quit procedure and trying out is a post silicon manner.
Verification is to verify the capability of the layout all through the design cycle.
Testing is locating manufacturing faults.
Question 69. While Writing Interrupt Handlers (isr), Which Are Points Needed To Be Considered?
Avoid sleep, use GFP_ATOMIC rather than GFP_KERNEL in kmalloc.
Question 70. Explain Can Microcontroller Work Independently?
Obviously, it can paintings independently. But to look the output we need sure output gadgets like LED, Buzzer can be related to test its capability. Without the help of any o/p tool linked we will test the functionality of Microcontroller.
Question seventy one. What Is Watchdog Timer?
A watchdog timer (or computer working nicely timer) is a pc hardware timing tool that triggers a machine reset if the principle software, because of some fault condition, inclusive of a hold, neglects to often service the watchdog. The purpose is to convey the device again from the hung country into regular operation.
Question 72. What Is Semaphore?
In laptop science, a semaphore is a protected variable or abstract information kind which constitutes the classic approach for proscribing get right of entry to to shared resources consisting of shared memory in a parallel programming environment. A counting semaphore is a counter for a set of available sources, in place of a locked/unlocked flag of a single aid.
Question seventy three. What Is Mutex?
Mutual exclusion (regularly abbreviated to mutex) algorithms are utilized in concurrent programming to keep away from the simultaneous use of a commonplace resource, consisting of a worldwide variable, with the aid of portions of pc code called critical sections.
Question 74. Can Structures Be Passed To The Functions By Value?
sure structures may be exceeded by means of price. But pointless reminiscence wastage.
Question 75. Why Cannot Arrays Be Passed By Values To Functions?
When a array is passed to a characteristic, the array is internally changed to a ‘pointer’. And pointers are constantly handed with the aid of reference.
Question seventy six. Advantages And Disadvantages Of Using Macro And Inline Functions?
Advantage: Macros and Inline features are efficient than calling a regular characteristic. The instances spend in calling the characteristic is saved in case of macros and inline features as these are included directly into the code.
Disadvantage: Macros and inline features expanded the size of executable code.
Question 77. Difference In Inline Functions And Macro
Macro is increased via preprocessor and inline characteristic are improved with the aid of compiler.
Expressions handed as arguments to inline features are evaluated only as soon as whilst _expression surpassed as argument to inline features are evaluated more than once.
More over inline functions are used to overcome the overhead of characteristic calls.
Macros are used to preserve the readability and clean maintenance of the code.
Question 78. What Happens When Recursion Functions Are Declared Inline?
It is illegal to declare a recursive characteristic as inline. Even a feature is asserted as inline compiler judges it to be inline or no longer. Many compilers can also inline amplify some recursive functions; recursive macros are commonly unlawful.
Question 79. Scope Of Static Variables?
Scope of static variable is in the file if it's miles static international. Scope of static variable is in the characteristic if variable is declared neighborhood to a characteristic. But the lifestyles time is throughout the program.
Question 80. What Is A Inode?
In computing, an inode is a records structure on a conventional Unix-style document gadget such as UFS. An inode shops primary records about a regular document, listing, or other file system item.
Question eighty one. Explain The Working Of Virtual Memory?
Virtual reminiscence is a laptop machine technique which offers an software program the influence that it has contiguous operating reminiscence (an deal with space), while in fact it is able to be bodily fragmented and may even overflow directly to disk storage. Systems that use this method make programming of large programs less difficult and use actual bodily reminiscence (e.G. RAM) extra effectively than those without digital reminiscence.
Question 82. What Is Concurrency? Explain With Example Deadlock And Starvation.
Concurrency is nothing but execution of various transactions simultaneously on one single aid.
Dead lock :
A group of threads are anticipating sources held by using others within the institution. None of them will ever make development.
An example of a deadlock which can also occur in database products is the subsequent. Client packages using the database may require distinct access to a desk, and in an effort to advantage special get entry to they ask for a lock. If one purchaser application holds a lock on a table and tries to gain the lock on a 2d table this is already held with the aid of a 2d client application, this can lead to impasse if the second one application then attempts to attain the lock that is held by using the first application.
A thread may additionally wait indefinitely due to the fact other threads maintain coming in and getting the asked sources earlier than this thread does. Note that resource is being actively used and the thread will forestall waiting if different threads prevent coming in.
High priority thread:
if the machine is precedence based totally device then low precedence thread never receives a risk.