pointer vs normal str assign

 #include <stdio.h>


int main() {

    // Write C code here

   //char str[]="Sayan Bhai";

   char *str = "Sayan Bhai";

   str="hello bhai";

   puts(str);

   

    

}

Comments

Popular posts from this blog

Sum of Even Numbers till N

Find the Runner-Up Score!

Print All Substrings