Bhanu Priya has Published 1581 Articles

What is strcmp() Function in C language?

Bhanu Priya

Bhanu Priya

Updated on 19-Mar-2021 09:57:34

585 Views

The C library function int strcmp(const char *str1, const char *str2) compares the string pointed to, by str1 to the string pointed to by str2.An array of characters is called a string.DeclarationFollowing is the declaration for an array −char stringname [size];For example − char string[50]; string of length 50 charactersInitializationUsing ... Read More

What is strncat() Function in C language?

Bhanu Priya

Bhanu Priya

Updated on 19-Mar-2021 09:53:42

1K+ Views

The C library function char *strncat(char *dest, const char *src, size_t n) appends the string pointed to by src to the end of the string pointed to by dest up to n characters long.An array of characters is called a string.DeclarationFollowing is the declaration for an array −char stringname [size];For ... Read More

What is strcat() Function in C language?

Bhanu Priya

Bhanu Priya

Updated on 19-Mar-2021 09:52:40

1K+ Views

The C library function char *strcat(char *dest, const char *src) appends the string pointed to by src to the end of the string pointed to by dest.An array of characters is called a string.DeclarationFollowing is the declaration for an array −char stringname [size];For example − char string[50]; string of length ... Read More

What is strncpy() Function in C language?

Bhanu Priya

Bhanu Priya

Updated on 19-Mar-2021 09:50:54

687 Views

The C library function char *strncpy(char *dest, const char *src, size_t n) copies up to n characters from the string pointed to, by src to dest. In a case where, the length of src is less than that of n, the remainder of dest will be padded with null bytes.An ... Read More

What is strcpy() Function in C language?

Bhanu Priya

Bhanu Priya

Updated on 19-Mar-2021 09:49:39

627 Views

The C library function char *strcpy(char *dest, const char *src) copies the string pointed to, by src to dest.An array of characters is called a string.DeclarationFollowing is the declaration for an arraychar stringname [size];For example − char string[50]; string of length 50 charactersInitializationUsing single character constant −char string[10] = { ... Read More

What is strspn() Function in C language?

Bhanu Priya

Bhanu Priya

Updated on 19-Mar-2021 09:47:21

224 Views

The C library function size_t strspn(const char *str1, const char *str2) calculates the length of the initial segment of str1 which consists entirely of characters in str2.An array of characters is called a string.DeclarationFollowing is the declaration for an array −char stringname [size];For example − char string[50]; string of length ... Read More

What is strcoll() Function in C language?

Bhanu Priya

Bhanu Priya

Updated on 19-Mar-2021 08:38:23

364 Views

The C library function int strcoll(const char *str1, const char *str2) compares string str1 to str2. The result is dependent on the LC_COLLATE setting of the location.An array of characters is called a stringDeclarationGiven below is the declaration of an array −char stringname [size];For example − char string[50]; string of ... Read More

What is strlen function in C language?

Bhanu Priya

Bhanu Priya

Updated on 17-Mar-2021 10:43:15

531 Views

The C library function size_t strlen(const char *str) computes the length of the string str up to, but not including the terminating null character.An array of characters is called a string.DeclarationGiven below is the declaration of an array −char stringname [size];For example − char a[50]; string of length 50 charactersInitializationUsing ... Read More

What is pass by reference in C language?

Bhanu Priya

Bhanu Priya

Updated on 17-Mar-2021 10:41:14

1K+ Views

Pass by reference in C programming language is the addresses which are sent as arguments.AlgorithmAn algorithm is given below to explain the working of pass by value in C language.START Step 1: Declare a function with pointer variables that to be called. Step 2: Declare variables a, b. Step 3: ... Read More

What is pass by value in C language?

Bhanu Priya

Bhanu Priya

Updated on 17-Mar-2021 10:39:59

3K+ Views

Pass by value is termed as the values which are sent as arguments in C programming language.AlgorithmAn algorithm is given below to explain the working of pass by value in C language.START Step 1: Declare a function that to be called. Step 2: Declare variables. Step 3: Enter two variables ... Read More

Advertisements