
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 33676 Articles for Programming

4K+ Views
The byte and bytearrays are used to manipulate binary data in python. These bytes and bytearrys are supported by buffer protocol, named memoryview. The memoryview can access the memory of other binary object without copying the actual data. The byte literals can be formed by these options. b‘This is bytea with single quote’ b“Another set of bytes with double quotes” b‘’’Bytes using three single quotes’’’ or b“””Bytes using three double quotes””” Some of the methods related to byte and bytearrays are − Method fromhex(string) The fromhex() method returns byte object. It takes a string where each byte is ... Read More

10K+ Views
In Python programming, some basic sequence type classes are, Lists , Strings , Tuples, Range, etc, these data structures hold an ordered collection of items. They allow us to access their elements through indexing and iteration, there are additional sequence-type objects such as Byte sequences. Sequence Types In Python Sequence types in Python are categorized into two types they are mutable and immutable sequences. Mutable Sequence Types These Sequences can be changed after their creation, and also we can modify elements, adding new elements and removing existing ones. Lists: A list is a mutable, ordered ... Read More

5K+ Views
The Numeric Types in Python are the integer datatypes. It includes integers, floatimg point, complex, etc. The complex includes real and imag parts. Also, includes Hexadecimal and Octal types. Python int datatype The Numeric Types include the int datatypes − a = 5 print("Integer = ", a) print("Type = ", type(a)) Output Integer = 5 Type = Python float datatype The Numeric Types include the float datatypes − Example a = 7E2 print("Float = ", a) print("Type = ", type(a)) Output Float = 700.0 Type = Python complex datatype The Numeric Types include the ... Read More

1K+ Views
The problem statement is to remove the nth character from the given string. Let's understand with an example. Consider my_string = "Tutorialspoint". The given value of n is 6; then we need to remove the 5th character from the string. Because the index value starts from zero. And it should result in "Tutorialspoint". Removing nth Character using a for Loop The for loop can be used to remove the n-th character from a string. In this approach, we iterate through each index of the string and print the characters. If the index value is equal to the given (n-1)th value, we ... Read More

625 Views
C++17 is the latest version of standard C++ language. C++11 and C++14 are the previous versions of C++. The current version makes several additions to the core language while some previous features are also removed. C++17 is known as feature full or feature complete. There are some of the new changes introduced in C++17 − Library changes - utils This is one of the most amazing feature of C++17. It merges the features and patterns of other libraries. Many of the sub-libraries are merged together into standards. The following features are added to utils library in C++17 − std::variant ... Read More

2K+ Views
Both strncmp() and strcmp() are used in C/C++ programs for lexicographical string comparison. The strcmp() compares two strings till the null character is found, whereas strncmp() only compares a specified number of characters. What is strncmp() ? The function strncmp() is used to compare left string to right string up to a number. It works same as strcmp(). It returns a value greater than zero when the matching character of left string has greater ASCII value than the character of the right string. Returns a value less than zero when the matching character of left string has lesser ASCII value ... Read More

24K+ Views
C++ scope resolution operator is used to access the variables, functions, and classes which are defined outside the current scope.What is Scope Resolution Operator (SRO) in C++?In C++, scope resolution operator is used to define a function outside the class and used to access the static variables of class. It access the identifiers like class and namespace. It is denoted by double colon (::) Note: If the global variable name is same as local variable name, the scope resolution operator will be used to call the global variable. Syntax The basic syntax of scope resolution operator as follows: scope::identifier ... Read More

357 Views
In C++, a single character is represented using a single quotation (' ') while a string is represented using a double quotation (" "). To change the single character into a string, use approaches like string_constructor, push_back(), etc., that solve the conversion. Example Input: ch = 'A' Output: str = A // "A" So, character A is converted to a string. C++ provides various approaches to convert single character into string as follows: Using string constructor Using push_back() Using stringstream ... Read More

82 Views
The function remquo() is used to calculate the floating point remainder of numerator or denominator and stores the quotient to the passed pointer. It returns Nan(Not a number) when denominator is zero.Here is the syntax of remquo() in C++ language, float remquo(float var1, float var2, int* var3);Here, var1 − The variable which stores the value of numerator.var2 − The variable which stores the value of denominator.var3 − The pointer variable which stores the quotient.Here is an example of remquo() in C++ language, Example Live Demo#include #include using namespace std; int main() { float x = 28.8; ... Read More

106 Views
The function ldexp() is used to calculate the multiplication of a floating point value ‘a’ by the number 2 raised to the exponent power. It takes two arguments, first is a floating point number and second is an integer value.Here is the mathematical expression of ldexp(), ldexp() = a * 2^bHere is the syntax of ldexp() in C++ language, float ldexp(float variable1 , int variable2)Here, variable1 − Any name given to the variable which is representing the significand.variable2 − Any name given to the variable which is representing the exponent.Here is an example of ldexp() in C++ language, Example Live Demo#include ... Read More