xxxxxxxxxx
#include <stdio.h>
#include <string.h>
int main() {
char str[] = "Hello"; // Declare and initialize a C-style string
printf("String: %s\n", str); // Print the string
int length = strlen(str); // Get the length of the string (excluding the null character)
printf("Length: %d\n", length);
return 0;
}
xxxxxxxxxx
String is a group of character or collection of nell terminators .
EXAMPLE CODE :
#include<stdio.h>
#include<conio.h>
void main(){
char sameeraz[20];
clrscr();
printf("ENTER STRING NAME:");
gets(s);
printf("MY NAME ID %s",s);
getch();
}