The exit(0) and exit(1) are the jump statements of C++ that make the control jump out of a program while the program is in execution. Both the functions, exit(0) and exit(1), are used to exit out of the program, but there is one major difference between exit(0) and exit(1). The exit (0) shows the successful termination of the program and the exit(1) shows the abnormal termination of the program. Let's study the difference between exit(0) and exit(1) with the help of a comparison … [Read more...]
Difference Between Array and Structure
Array and structure both are the container data type. The major difference between an array and structure is that an "array" contains all the elements of "same data type" and the size of an array is defined during its declaration, which is written in number within square brackets, preceded by the array name. A "structure" contains all the elements of "different data type", and its size is determined by the number of elements declared in a structure when it is defined. There are some more … [Read more...]
Difference Between Go-Back-N and Selective Repeat Protocol
"Go-Back-N Protocol and "Selective Repeat Protocol" are the sliding window protocols. The sliding window protocol is primarily an error control protocol, i.e. it is a method of error detection and error correction. The basic difference between go-back-n protocol and selective repeat protocol is that the "go-back-n protocol" retransmits all the frames that lie after the frame which is damaged or lost. The "selective repeat protocol" retransmits only that frame which is damaged or … [Read more...]
Difference Between if-else and switch
"If-else" and "switch" both are selection statements. The selection statements, transfer the flow of the program to the particular block of statements based upon whether the condition is "true" or "false". The fundamental difference between if-else and switch statements is that the if-else statement "selects the execution of the statements based upon the evaluation of the expression in if statements". The switch statements "selects the execution of the statement often according to a keyboard … [Read more...]
Difference Between Pointer and Reference
The "pointer" and "reference" both are used to point or refer an another variable. But, the basic difference among both of them is that a pointer variable points to a variable whose memory location is stored in it. The reference variable is an alias for a variable which is assigned to it. The comparison chart below explores the other differences between a pointer and a reference. Content: Pointer Vs Reference Comparison Chart Definition Key Differences … [Read more...]
Difference Between & and &&
The "&" and "&&" both are the operators, used to evaluate the conditional statements. The & operator is a logical as well as, a bitwise operator. The && operator is purely a Logical operator. The basic difference between the & and && operator is that the & operator evaluate both sides of the expression whereas, the && operator evaluates only the left-hand side of the expression to obtain the final result. Let us understand the other differences … [Read more...]
Difference Between Inheritance and Polymorphism
Inheritance allows, code reusability and the polymorphism is, the occurrence of one function with different form. The basic difference between inheritance and polymorphism is that inheritance allows the already existing code to be reused again in a program, and polymorphism provides a mechanism to dynamically decide what form of a function to be invoked. Content: Inheritance Vs Polymorphism Comparison Chart Definition Key Differences Conclusion Comparison … [Read more...]
Difference Between Abstraction and Encapsulation
Abstraction is a process of collecting important information which will create a base for building up a complex system. Encapsulation is a process of making a complex system easier to handle for an end-user, without worrying about its internal complexities. The basic difference between "abstraction" and "encapsulation" is that abstraction focuses on "identifying the necessary components for building a system" whereas, encapsulation focuses on "hiding the internal complexities of a … [Read more...]
Difference Between Structure and Union
C++ allows all the five ways that the C language provided to create a custom data. Those five ways are 'structure', 'bit-field', 'union', 'enumeration', 'typedef'. In the article below we are going to study the difference between structure and union. The structure and union both are the container data types that can hold data of any "type". The one major difference that distinguishes structure and union is that the structure has a separate memory location for each of its members whereas, the … [Read more...]
Difference Between Structure and Class
Both a structure and a class provides a way to create a customized data type which can be used further to create instances. C++ expands the role of structure to create a class. The Structure and class, are almost similar in all respect except the significant one difference that, structure by default have all its member as “public”, and class by default have all its member “private”. Furthermore, polymorphism and inheritance are not supported by the structure, but classes support polymorphism … [Read more...]
- « Previous Page
- 1
- …
- 11
- 12
- 13
- 14
- 15
- 16
- Next Page »