You are on page 1of 7

What is the difference between white box & black box testing?

Black box testing is a testing strategy based solely on requirements and specifications. Black box testing requires no knowledge of internal paths, structures, or implementation of the software being tested. White box testing is a testing strategy based on internal paths, code structures, and implementation of the software being tested. White box testing generally requires detailed programming skills. List advantage and Disadvantages of them? -----------What is the difference between a defect and a failure? When a defect reaches the end customer it is called a failure and if the defect is detected internally and resolved it's called a defect.

What is Throughput, Turnaround time, waiting time and Response time? Throughput: number of processes that complete their execution per time unit. Turnaround time: amount of time to execute a particular process. Waiting time: amount of time a process has been waiting in the ready queue. Response time: amount of time it takes from when a request was submitted until the first response is produced, not output (for time-sharing environment). What is verification and validation? Verification refers to the set of activities that ensure that software correctly implements a specific function. Validation refers to the set of activities that ensure that the software that has been built is traceable to customer requirements. Define cyclomatic complexity? Cyclomatic complexity is software metric that provides a quantitative measure of the logical complexity of a program. Define cohesion and coupling? Cohesion is a measure of the relative functional strength of a module. Coupling is a measure of the relative interdependence among modules. Different types of cohesion? Coincidental cohension Logical cohension Temporal cohension Procedural cohension Communicational cohension

Different types of coupling? Data coupling Stamp coupling Control coupling External coupling Common coupling Content coupling Difference between Unicast, multicast and broadcast? Unicast is the term used to describe communication where a piece of information is sent from one point to another point. In this case there is just one sender, and one receiver. Broadcast is the term used to describe communication where a piece of information is sent from one point to all other points. In this case there is just one sender, but the information is sent to all connected receivers. Multicast is the term used to describe communication where a piece of information is sent from one or more points to a set of other points. In this case there is may be one or more senders, and the information is distributed to a set of receivers (theer may be no receivers, or any other number of receivers). Difference between precision and accuracy? Accuracy: The degree of closeness to true value. Precision: The degree to which an instrument or process will repeat the same value.

Difference between simulator and emulator? A simulation is a system that behaves similar to something else, but is implemented in an entirely different way. It provides the basic behavior of a system but may not necessarily abide by all of the rules of the system being simulated. It is there to give you an idea about how something works. An emulation is a system that behaves exactly like something else, and abides by all of the rules of the system being emulated. It is effectively a complete replication of another system, right down to being binary compatible with the emulated system's inputs and outputs, but operating in a different environment to the environment of the original emulated system. The rules are fixed, and cannot be changed or the system fails.

Differentiate between TCP and UDP?


TCP
Transmission Protocol

UDP
Control User Datagram Protocol or Universal Datagram Protocol

Acronym for

Connection

TCP is a connection-oriented UDP is a connectionless protocol. protocol. As a message makes its way UDP is also a protocol used in message transport across the internet from one or transfer. This is not connection based which

Function

computer to another. This is means that one program can send a load of connection based. packets to another and that would be the end of the relationship. TCP is suited for applications UDP is suitable for applications that need fast, that require high reliability, efficient transmission, such as games. UDP's

Usage

and

transmission

time

is stateless nature is also useful for servers that answer small queries from huge numbers of clients.

relatively less critical.

Examples

HTTP, HTTPs, FTP, SMTP, DNS, DHCP, TFTP, SNMP, RIP, VOIP. Telnet
of

Ordering data packets Speed transfer

TCP rearranges data packets UDP has no inherent order as all packets are in the order specified. independent of each other. If ordering is required, it has to be managed by the application layer.

of

The speed for TCP is slower UDP is faster because there is no error-checking than UDP. for packets.

There is absolute guarantee There is no guarantee that the messages or packets that
Reliability

the

data

transferred sent would reach at all.

remains intact and arrives in the same order in which it was sent.

Header Size Common Header Fields

TCP header size is 20 bytes

UDP Header size is 8 bytes.

Source port, Destination port, Source port, Destination port, Check Sum Check Sum Data is read as a byte stream, Packets are sent individually and are checked for no distinguishing indications integrity only if they arrive. Packets have definite

Streaming data

of

are

transmitted

to

signal boundaries which are honored upon receipt, will yield an entire message as it was originally sent.

message boundaries.

(segment) meaning a read operation at the receiver socket

What is the difference between a Stack and an Array? Stack: Stack is a dynamic object whose size is constantly changing as items are pushed and popped. Stack may contain different data types. Stack is declared as a structure containing an array to hold the element of the stack, and an integer to indicate the current stack top within the array. Stack is a ordered collection of items. Array: Array is an ordered collection of items. Array is a static object. It contains same data types. Array can be home of a stack i.e. array can be declared large enough for maximum size of the stack. What do you mean by overflow and underflow? Overflow: the condition that occurs when a calculation produces a result that is greater in magnitude than that which a given register or storage location can store or represent. Underflow: the condition in a computer program that can occur when the true result of a floating point operation is smaller in magnitude (that is, closer to zero) than the smallest value representable as a normal floating point number in the target datatype.

What are signals and why are they required in operating system? Signals are software interrupts. Signals provide a way of handling asynchronous events: a user at a terminal typing the interrupt key to stop a program or the next program in the pipeline terminating prematurely. What is the unix command to send message to all users who are logged in? Wall What is nice command in unix? Command that lets to change priority of a process. What is tac command in unix? Concatenate and print files in reverse. What is grep command in unix? grep is a pattern search command. It searches for the pattern, specified in the command line with appropriate option, in a file(s). What is the use of break and continue statements in C?

The continue statement suspends execution of all statements following it, and switches control to the top of the loop for the next iteration. The break statement, on the other hand, causes control to break out of the loop. What are the differences between structures and union? A structure variable contains each of the named members, and its size is large enough to hold all the members. Structure elements are of same size. A Union contains one of the named members at a given time and is large enough to hold the largest member. Union element can be of different sizes. What is the difference between arrays and pointers? Array is collection of similar datatype. It is a static memory allocation means we cannot increment and decrement the array size once we allocated. And we cannot increment the base address, reassign address. Pointer is a dynamic memory allocation. We can allocate the size as we want, assigning into another variable and base address incrementation is allowed. What is the difference between malloc and calloc? malloc is use for memory allocation and initialize garbage values.malloc () for allocating the single block of memory. calloc is same as malloc but it initialize 0 value. calloc () for allocating multiple blocks of memory. In C, why is the void pointer useful? When would you use it? The void pointer is useful because it is a generic pointer that any pointer can be cast into and back again without loss of information. Difference between virus and Trojan? Virus: A computer virus is a type of malware that propagates by inserting a copy of itself into and becoming part of another program. It spreads from one computer to another, leaving infections as it travels. Worms: Computer worms are similar to viruses in that they replicate functional copies of themselves and can cause the same type of damage. In contrast to viruses, which require the spreading of an infected host file, worms are standalone software and do not require a host program or human help to propagate. Trojan: Harmful piece of software that looks legitimate, usally activated by executing them. They do not self replicate. Difference between big endian and little endian machine architecture? In big endian, the most significant byte is stored at the memory address location with the lowest address. This is akin to left-to-right reading order. Little endian is the reverse: the most significant byte is stored at the address with the highest address.

Difference between router, bridge, & gateway? -------------What is Race Condition? A cause of concurrency problems where multiple accesses to a shared resource, at least one of which is a write, with no mechanism used by either to moderate simultaneous access. What are memory leaks and buffer overflows? Memory leak: A bug in a program that prevents it from freeing up memory that it no longer needs. As a result, the program grabs more and more memory until it finally crashes because there is no more memory left. Buffer overflow: occurs when a program or process tries to store more data in a buffer (temporary data storage area) than it was intended to hold. Since buffers are created to contain a finite amount of data, the extra information - which has to go somewhere - can overflow into adjacent buffers, corrupting or overwriting the valid data held in them

Difference between inline and macro function in C? Inline replaces a call to a function with the body of the function, however, inline is just a request to the compiler that could be ignored (you could still pass some flags to the compiler to force inline or use *always_inline* attribute with gcc). A macro on the other hand, is expanded by the preprocessor before compilation, so it's just like text substitution, also macros are not type checked, and inline functions are. Algorithm to find trailing zeroes of factorial of a number? 5! =120 has one trailing zeroes. Find pairs of 5*2 in the factorial

What is the difference between a thread and a process? A process is an executing instance of an application. A thread is a path of execution withina process. Also, a process can contain multiple threads. Eg. When you start Word, the operating system creates a process and begins executing the primary thread of that process. What is the difference between Swapping and Paging? Swapping: Whole process is moved from the swap device to the main memory for execution. Process size must be less than or equal to the available main memory. It is easier to implementation and overhead to the system. Swapping systems does not handle the memory more flexibly as compared to the paging systems.

Paging: Only the required memory pages are moved to main memory from the swap device for execution. Process size does not matter. Gives the concept of the virtual memory. It provides greater flexibility in mapping the virtual address space into the physical memory of the machine. Allows more number of processes to fit in the main memory simultaneously. Allows the greater process size than the available physical memory. Demand paging systems handle the memory more flexibly.

Difference between fork and exec in C? The fork call basically makes a duplicate of the current process, identical in almost every way (not everything is copied over, for example, resource limits in some implementations but the idea is to create as close a copy as possible). The new process (child) gets a different process ID (PID) and has the PID of the old process (parent) as its parent PID (PPID). Because the two processes are now running exactly the same code, they can tell which is which by the return code of fork - the child gets 0, the parent gets the PID of the child. This is all, of course, assuming the fork call works - if not, no child is created and the parent gets an error code. The exec call is a way to basically replace the entire current process with a new program. It loads the program into the current process space and runs it from the entry point. Difference between interrupts, signals and exception? Signals: Used by the kernel to notify processes of system events. It is a short message sent to a process, or group of processes, containing the number identifying the signal. Linux supports 31 non-real-time signals Interrupts are events that alter sequence of instructions executed by a processor. They are issued by interval timers and I/O devices. Exceptions, on the other hand, are caused either by programming errors or by anomalous conditions that must be handled by the kernel.

You might also like