Skip to content

Tag Archives: C Array and String

Consider the below program.  C void read() {    char str[20];    gets(str);    printf("%s", str);    return; } The code looks simple, it reads string from standard input… Read More
Let us consider the below program. #include<stdio.h> void swap(char *str1, char *str2) {   char *temp = str1;   str1 = str2;   str2 = temp; }      … Read More
In C, a string can be referred to either using a character pointer or as a character array. Strings as character arrays   C char str[4] =… Read More

Start Your Coding Journey Now!