We are all familiar with the working of macros in languages like C. There are certain situations in which macro expansions can lead to undesirable results because of ...
Share
Since the dawn of computers, Hollywood has greatly demonstrated a Hacker or a Programmer as someone sitting on a computer typing random keys on computer which ultimat...
Share
This header introduces random number generation facilities. This library allows to produce random numbers using combinations of generators and distributions.
Generat...
Share
Set 1 (Generators)
Distributions
I. Uniform :
uniform_int_distribution: It produces random integer values i, which are uniformly distributed on the closed interva...
Share
Given two floating point numbers, find remainder.
Examples:
Input : a = 36.5,
b = 5.0
Output : 1.5
Input : a = 9.7,
b = 2.3
Output : 0.5
Recomm...
Share
Decimal equivalent of 1/3 is 0.33333333333333…. An infinite length number would require infinite memory to store, and we typically have 4 or 8 bytes. Therefore...
Share
Given three distinct numbers a, b and c find the number with a value in middle.
Examples :
Input : a = 20, b = 30, c = 40
Output : 30
Input : a = 12, n = 32, c = 11
...
Share
C# is a general-purpose, modern and object-oriented programming language pronounced as “C sharp”. It was developed by Microsoft led by Anders Hejlsberg ...
Share
In general, when we try to copy one object to another object, both the objects will share the same memory address. Normally, we use assignment operator, = , to copy t...
Share
C# language provides several techniques to read a collection of items. One of which is foreach loop. The foreach loop provides a simple, clean way to iterate through ...
Share