What is wrong with this statement? myName = "Nurujjaman";

C Programming Language >   String in C Language >   Introduction to String  

Short Question

1024


Answer:

You cannot use the = sign to assign values to a string variable. Instead, use the strcpy function. The correct statement would be: strcpy(myName, "Nurujjaman");


This Particular section is dedicated to Question & Answer only. If you want learn more about C Programming Language. Then you can visit below links to get more depth on this subject.




Join Our telegram group to ask Questions

Click below button to join our groups.