Computer Science, asked by naveen8673, 10 months ago

फैक्शनों को स्ट्रिंग किस प्रकार पास की जाती है? उदाहरण सहित समझाइए।

Answers

Answered by queensp73
0

Answer:

Commonly used String functions in C/C++ with Examples. Strings in C: Strings are defined as an array of characters. The difference between a character array and a string is the string is terminated with a special character '\0'. It will append copy of the source string in the destination string.

Passing Strings to Functions

#include <stdio.h>

void displayString(char str[]);

int main()

{

char str[50];

printf("Enter string: ");

gets(str);

displayString(str); // Passing string c to function.

In C programming, a string is a sequence of characters terminated with a null character \0 . For example: char c[] = "c string"; When the compiler encounters a sequence of characters enclosed in the double quotation marks, it appends a null character \0 at the end by default.

Explanation:

HOPE THIS HELPS U MY FRD !

PLZ MARK AS BRAINLIEST !

>>>>>>THANK U<<<<<

#keep smiling :)

Similar questions