Run ❯
×
Change Orientation
Change Theme, Dark/Light
#include
#include
struct myStructure { int myNum; char myLetter; char myString[30]; // String }; int main() { struct myStructure s1; // Assign a value to the string using the strcpy function strcpy(s1.myString, "Some text"); // Print the value printf("My string: %s", s1.myString); return 0; }
My string: Some text