Both “break” and “continue” are the ‘jump’ statements, that transfer control of the program to another part of the program. The main difference between break and continue is that break is used for immediate termination of loop. On the other hand, 'continue' terminate the current iteration and resumes the control to the next iteration of the loop. The break statement is primarily used as the exit statement, which helps in escaping from the current block or loop. Conversely, the continue … [Read more...]
Difference Between Type Casting and Type Conversion
The basic difference between type conversion and type casting, i.e. type conversion is made “automatically” by compiler whereas, type casting is to be “explicitly done” by the programmer. The two terms “type casting” and “type conversion” occur when there is a need to convert one data type to another. When the two types are compatible with each other, then the conversion of one type to other is done automatically by the compiler. Let’s discuss the difference both type casting and conversion … [Read more...]
Difference Between Static and Dynamic Binding
Binding association of a 'function definition' to a 'function call' or an association of a 'value' to a 'variable', is called 'binding'. During compilation, every 'function definition' is given a memory address; as soon as function calling is done, control of program execution moves to that memory address and get the function code stored at that location executed, this is Binding of 'function call' to 'function definition'. Binding can be classified as 'static binding' and 'dynamic … [Read more...]
Difference Between Local and Global Variable
As we discussed earlier, a variable is a name, given to a memory location, and it must be declared before it is used. In C, all the variables are declared at the starting of the program. In C++, variables can be declared, at any point of time, before they are used in the instructions. Variables are classified into ‘local’ and ‘global’ variable, which is the main topic of our discussion. Here the main difference between local and global variable is that a local variable is declared inside a … [Read more...]
Difference Between Identifier and Variable
The word ‘identifier’ clearly defines itself; an identifier is a name given to an entity, which distinctly identifies an entity in a program at the time of its execution. Variable is also an identifier; its name uniquely identifies itself in a program. Here, the fundamental difference between an identifier and variable is that an identifier is a “name given to entity” in a program whereas, a variable is a “name given to memory location”, that is used to hold value, which may get modified … [Read more...]
Difference Between Keyword and Identifier
Every language has keywords and identifiers, which are only understood by its compiler. Keywords are predefined reserved words, which possess special meaning. Each keyword defines the “type” declared data. Keywords should not be used as identifiers. An identifier is a unique name given to a particular variable, function or label of class in the program. To create a variable, both a keyword and an identifier are bind together. The identifiers can be altered if required, while this is not the … [Read more...]
Difference Between Function Overloading and Overriding in C++
Overloading and Overriding are the concepts of Polymorphism. In 'overloading' we redefine a function of a class with the same name but with, different numbers and types of parameters. In the 'overriding' prototype the overridden function is the same throughout the program but, the function to be overridden is preceded by the keyword 'virtual' in the base class and is redefined by the derived class without any keyword. Polymorphism is one of the crucial features of OOP. It simply means … [Read more...]
Difference Between Constructor and Destructor
Constructor and destructor are the member functions with the same name as their class. The former type constructor helps in initializing an object. Conversely, a destructor is different from the constructor which deletes the created constructor when it is of no use. Sometimes it is required to initialize some part of an object before it can be utilized. For example, we are operating on the stack, before we perform any action, the top of the stack must always be set to zero. This feature of … [Read more...]
Difference Between Synchronous and Asynchronous Transmission
In the previous article, we have discussed Serial and Parallel Transmission. As we know in Serial Transmission data is sent bit by bit, in such a way that each bit follows another. It is of two types namely, Synchronous and Asynchronous Transmission. One of the major differences is that in Synchronous Transmission, the sender and receiver should have synchronized clocks before data transmission. Whereas Asynchronous Transmission does not require a clock, but it adds a parity bit to the data … [Read more...]
Difference Between OOP and POP
Procedure-oriented Programming(POP) and Object-oriented programming(OOP) both are the programming approaches, which uses high-level language for programming. A program can be written in both the languages, but if the task is highly complex, OOP operates well as compared to POP. In POP, the ‘data security’ is at risk as data freely moves in the program, as well as, ‘code reusability’ is not achieved which makes the programming lengthy, and hard to understand. Large programs lead to more bugs, … [Read more...]