Copy string without string function

#include <stdio.h>
int main()
{

    char a1[100], b1[100], i;

    printf("Enter the string a1: ");
    scanf("%s",a1);

    for(i = 0; a1[i] != '\0'; ++i)
    {
        b1[i] = a1[i];
    }

    b1[i] = '\0';

    printf(" String b1: %s", b1);

    return 0;
}



OUTPUT :-



For Other Programs Visit The WebSite:-   https://www.techapurba.com/
                                                                                                                      
Follow Me On Social Media :-
INSTA photography page :- https://www.instagram.com/photo_mania_hub/

Insta photography link :- https://www.instagram.com/photo_mania_hub/
For tech related videos visit my other website :- https://apurbatechinfo.blogspot.com/

Post a Comment

0 Comments