Programming Articles - Page 1905 of 3366

Difference between scanf() and gets() in C

Nitin Sharma
Updated on 09-Jun-2020 08:53:21

10K+ Views

In C language both scanf() and gets() functions are defined to get input from external source and pass to system as input. Now there is some characteristics difference between both the functions.Following are the important differences between scanf() and gets() in C −Sr. No.Keyscanf() functiongets() function1DefinitionThe scanf() function can read input from keyboard and stores them according to the given format specifier. It reads the input till encountering a whitespace, newline or EOF.On other hand gets() function is used to receive input from the keyboard till it encounters a newline or EOF. The whitespace is considered as a part of ... Read More

Difference between Class and Structure in C#

Nitin Sharma
Updated on 09-Jun-2020 08:36:53

945 Views

In order to differentiate between Class and Structure, we have to first understand that both structure and class seems to be equivalent in the context of holding and defining the data. Both of these could define as well as hold some default values in their data members. But if we consider them beyond this context then Class provides more flexibility along with functionality as compared to the Structure.Following are the important differences between Class and Structure.Sr. No.KeyClassStructure1Data TypeData defined in a class is stored in the memory as a reference and has particular address in order to get accessed, so ... Read More

Difference between bindParam and bindValue in PHP

Nitin Sharma
Updated on 09-Jun-2020 08:30:50

4K+ Views

Both bindParam and bindValue are the inbuilt functions of PHP which are used for accessing database records by mapping variable to the value in PHP data objects statement also known as PDOStatement which is nothing else but is an abstraction layer for database queries.Following are the important differences between ASP and ASP.NET.Sr. No.KeybindParam functionbindValue function1DefinitionbindParam is a PHP inbuilt function used to bind a parameter to the specified variable name in a sql statement for access the database record.bindValue, on the other hand, is again a PHP inbuilt function used to bind the value of parameter to the specified variable ... Read More

Difference between IPv4 and IPv6

Kiran Kumar Panigrahi
Updated on 22-Aug-2022 14:24:46

7K+ Views

IPv4 and IPv6 are internet protocol versions, with IPv6 being an upgraded version of IPv4. There are several differences between the IPv4 and IPv6 protocols, including their functionality, but the most important difference is the quantity of addresses (Address space) that they create.Read through this article to find out more about IPv4 and IPv6 and how they are different from each other.What is Internet Protocol (IP)?The Internet Protocol is a set of rules that allows our computers to communicate via the Internet. IP addresses are basically in charge of directing the data packets to their correct destinations. IP controls all ... Read More

Difference between while(1) and while(0) in C language

Nitin Sharma
Updated on 09-Jun-2020 08:11:26

1K+ Views

As we know that in C language 'while' keyword is used to define a loop which works on the condition passed as argument to the loop. Now as condition can have two values either true or false so the code inside while block will be executed repeatedly if condition is true and if condition is false the code will not be executed.Now passing the argument to the while loop we can distinguish between while(1) and while(0) as while(1) is the loop where the condition is always treated as true and so the code inside the block start executing repeatedly. Additionally, ... Read More

Difference between Spiral Model and Waterfall Model

Kiran Kumar Panigrahi
Updated on 14-Dec-2022 18:28:09

2K+ Views

Both the Spiral Model and the Waterfall Model are widely used development methodologies in the software industry. Both of these models are practices for better tracking and have application development in systematic way. The basic difference between spiral model and waterfall model is that the spiral model works in evolutionary method and generally used by developers, whereas the waterfall model works in a sequential method and generally used by customers. In this article, we will discuss the important differences between spiral model and waterfall model. But before going into the differences, let's start with some basics of these two ... Read More

Difference between Incremental Model and WaterFall Model

Kiran Kumar Panigrahi
Updated on 21-Dec-2022 10:26:13

7K+ Views

The Waterfall model and the Incremental Model are widely used in software development. The objective of having these models is to ensure that the software is developed in a systematic, organized and efficient manner. Read this article to find out more about the Waterfall model and the Incremental model and how they are different from each other. What is the Incremental Model? The incremental Model is a software development model in which the entire model is divided into various sub−development phases where the corresponding testing phase for each development phase is practiced. The execution of the phases, i.e., ... Read More

Difference between HashTable and Dictionary in C#

Nitin Sharma
Updated on 09-Jun-2020 07:51:55

6K+ Views

Both HashTable and Dictionary are the type of data structure which are used to store data. Both of these data structures hold the stored data in key value pair.On the basis of difference between key features of these we can distinguish between HashTable and Dictionary as follows −Sr. No.KeyHashTableDictionary1DefinitionHashTable is the non-generic type of collection which is used to store data in key/value pair and is defined in System.Collections name space.On other hand Dictionary is a generic type collection defined under System.Collection.Generics name space which also store data in the form of key/value pairs.2DataTypeIn HashTable same or different data type ... Read More

Integer to English Words in Python Programming

Arnab Chakraborty
Updated on 09-Jun-2020 07:37:06

2K+ Views

Suppose we have a number. The number can be anything in between 0 to 231 – 1. We have to convert the number into words. So if the number is like 512, then the result will be Five hundred twelve.To solve this, we will follow these steps −Define some lists like less_than_20, this will hold all words from one to nineteenAnother array like tens to hold tens, twenty, thirty and so on up to ninetyAnother array for thousands, to hold thousand, million and billionDefine one function called helper(), this will take nif n is 0, then return blank stringotherwise when ... Read More

Binary Tree Postorder Traversal in Python Programming

Arnab Chakraborty
Updated on 09-Jun-2020 07:35:29

249 Views

Suppose we have a binary tree. We have to find the post order traversal of this tree using iterative approach. So if the tree is like −Then the output will be: [9, 15, 7, 10, -10]To solve this, we will follow these steps −if root is null, then return empty arraycreate an array retstack := define a stack with pair [root, 0]while stack is not empty −node := top of stack, then delete element from stack.if second value of node pair is 0, thencurrent := first value of node pairinsert a pair (current, 1) into stackif right of current is ... Read More

Advertisements