/*
Author: Atnyla Developer
*/
#include<stdio.h>
int main ()
{
char string1[11] = {'h', 'e', 'l', 'l', 'o', 'w', 'o', 'r', 'l', 'd', '\0'};
char string2[11] = "helloworld";
char string3 [] = "helloworld";
printf("The string is : %s \n", string1 );
printf("The string is : %s \n", string2 );
printf("The string is : %s \n", string3 );
return 0;
}
The string is : helloworld
The string is : helloworld
The string is : helloworld
Press any key to continue . . .
First understand the algorithm carefully. Then study the program line-by-line and compare it with the output. Finally, review the explanation section to strengthen your logic and programming understanding.
Rewrite the program without looking at the code. Modify values, conditions or logic and run it again. This helps improve confidence and strengthens coding skills much faster.