karthikeya Boyini

karthikeya Boyini

1,421 Articles Published

Articles by karthikeya Boyini

Page 49 of 143

strcspn() in C

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 404 Views

The strcspn() function in C counts the number of characters in the initial segment of a string that do not match any character from a second string. It is declared in the string.h header file and returns the length of the initial segment of the first string before the first occurrence of any character from the second string. Syntax size_t strcspn(const char *string1, const char *string2); Parameters: string1 − The string to be scanned string2 − The string containing characters to search for in string1 Return Value: Returns the number of characters ...

Read More

isgreater() in C/C++

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 381 Views

In C programming, the isgreater() function is a type-generic macro used to compare two floating-point values safely. It is declared in the header file and returns a non-zero value (true) if the first argument is greater than the second, otherwise returns 0 (false). Unlike the regular > operator, isgreater() never raises floating-point exceptions. Syntax int isgreater(x, y); Parameters: x − First floating-point value to compare y − Second floating-point value to compare Return Value: Returns 1 if x is greater than y, otherwise returns 0. Example 1: Basic Usage with ...

Read More

strdup() and strdndup() in C/C++

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 8K+ Views

The functions strdup() and strndup() are used to duplicate strings in C. These functions allocate memory dynamically and create copies of existing strings. Note that these are POSIX functions, not part of the C standard library. Note: To use strdup() and strndup(), you may need to compile with -D_GNU_SOURCE flag or ensure your system supports POSIX extensions. strdup() Function The strdup() function duplicates an entire string by allocating memory and copying the string content. Syntax char *strdup(const char *string); Parameters string − Pointer to the null-terminated string to ...

Read More

Float and Double in C

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 56K+ Views

In C programming, float and double are data types used to represent floating point numbers. Both follow the IEEE 754 standard but differ in precision and memory usage. Float Data Type Float is a 32-bit IEEE 754 single precision floating point number with the following structure − 1 bit for the sign 8 bits for the exponent 23 bits for the mantissa (fractional part) Precision: 6-7 decimal digits Syntax float variable_name; Example: Float Declaration and Usage #include int main() { float x ...

Read More

"register" keyword in C

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 10K+ Views

In C programming, the register keyword is a storage class specifier that suggests to the compiler to store a variable in CPU registers instead of main memory. Register variables provide faster access since CPU registers are much faster than memory. However, taking the address of a register variable is not allowed. Syntax register data_type variable_name; Properties of Register Variables Scope: Local to the function in which they are declared Default value: Garbage value (uninitialized) Lifetime: Until the end of the block execution Storage: CPU registers (compiler's choice) Address: Cannot use address-of operator (&) ...

Read More

How to add auto-increment to column in MySQL database using PhpMyAdmin?

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 10K+ Views

You can add auto_increment to a column in MySQL database with the help of ALTER command. The syntax is as follows − ALTER TABLE yourTableName MODIFY yourColumnName INT NOT NULL AUTO_INCREMENT; Using PhpMyAdmin To open PhpMyAdmin on localhost, you need to type the following URL in your browser − localhost/phpmyadmin The PhpMyAdmin interface appears as follows − phpMyAdmin Database: AutoIncrementDemo Table: AutoIncrementDemo Field: UserId | Type: INT | Primary Key ...

Read More

IntlChar getUnicodeVersion() function in PHP

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 72 Views

The IntlChar getUnicodeVersion() function is used to get the Unicode version that the ICU library is using. It returns an array containing version numbers that represent the Unicode standard version. Syntax array IntlChar::getUnicodeVersion() Parameters This function takes no parameters. Return Value The IntlChar getUnicodeVersion() function returns an array containing four integers representing the Unicode version number in the format [major, minor, micro, update]. Example The following example demonstrates how to get the Unicode version ? The output of the above code is ? ...

Read More

IntlChar getBidiPairedBracket() function in PHP

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 89 Views

The IntlChar::getBidiPairedBracket() function returns the paired bracket character for a given Unicode character. This function is useful when working with bidirectional text processing where you need to find the matching bracket for proper text rendering. Syntax IntlChar::getBidiPairedBracket(mixed $codepoint) Parameters codepoint − An integer codepoint value or a character encoded as a UTF-8 string. Return Value Returns the mapped paired bracket character as a string, or the original character if no paired bracket exists. Returns NULL for invalid input. Example The following example demonstrates how to find paired brackets ...

Read More

IntlChar charType() function in PHP

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 89 Views

The IntlChar::charType() function determines the general Unicode category of a character. This function is part of PHP's Intl extension and helps classify characters according to Unicode standards. Syntax int IntlChar::charType(mixed $codepoint) Parameters $codepoint − An integer codepoint value or a character/string encoded as UTF-8. Return Value Returns an integer representing the general category. Common categories include − IntlChar::CHAR_CATEGORY_UPPERCASE_LETTER − Uppercase letters (A-Z) IntlChar::CHAR_CATEGORY_LOWERCASE_LETTER − Lowercase letters (a-z) IntlChar::CHAR_CATEGORY_DECIMAL_DIGIT_NUMBER − Decimal digits (0-9) IntlChar::CHAR_CATEGORY_OTHER_PUNCTUATION − Punctuation marks IntlChar::CHAR_CATEGORY_MATH_SYMBOL − Mathematical symbols IntlChar::CHAR_CATEGORY_CURRENCY_SYMBOL − Currency symbols IntlChar::CHAR_CATEGORY_SPACE_SEPARATOR − Space characters ...

Read More

IntlChar tolower() function in PHP

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 101 Views

The IntlChar::tolower() function converts a Unicode character to its lowercase equivalent. This function is part of PHP's Intl extension and works with Unicode codepoints and UTF-8 encoded characters. Syntax IntlChar::tolower(mixed $codepoint) Parameters codepoint − An integer representing a Unicode codepoint value, or a character encoded as a UTF-8 string. Return Value The function returns the lowercase equivalent of the given character. If the character is already lowercase or has no lowercase mapping, the same character is returned. Returns NULL on failure or for invalid input. Example The following ...

Read More
Showing 481–490 of 1,421 articles
« Prev 1 47 48 49 50 51 143 Next »
Advertisements