0% found this document useful (0 votes)
255 views4 pages

String Manipulation in C Programming

Uploaded by

Mai Gado
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
255 views4 pages

String Manipulation in C Programming

Uploaded by

Mai Gado
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

#include<stdio.

h>
#include<string.h>

int main()
{
char [20] = "Hello", [20] = " World"
printf("%s\n", strcpy( , strcat( ,
return 0;
}

char str1[20] = "Hello", str2[20] = " World";

printf("%s\n", strcpy(str2, strcat(str1, str2)));

strcat(str1, str2)) str2


str1

strcpy(str2, "Hello World")

#include<stdio.h>

int main()
{
char [] = "%d\n";
[1] = 'c';
printf( , 65);
return 0;
}
char p[] = "%d\n"; p

p[1] = 'c'; p p

printf(p, 65); printf("%c", 65);

#include<stdio.h>
#include<string.h>

int main()
{
printf("%d\n", strlen("123456"));
return 0;
}

strlen

strlen("123456")
#include<stdio.h>

int main()
{
printf(5+"Good Morning\n");
return 0;
}

printf(5+"Good Morning\n");

#include<stdio.h>
#include<string.h>

int main()
{
char [] = "India\0\BIX\0";
printf("%s\n", );
return 0;
}

char str[] = "India\0\BIX\0";


printf("%s\n", str);

You might also like