运行 ❯
建立您
自己的
网站
×
更改方向
更改主题,深色/浅色
前往 Spaces
#include <stdio.h> struct myStructure { int myNum; char myLetter; char myString[30]; }; int main() { // Create a structure variable and assign values to it struct myStructure s1 = {13, 'B', "Some text"}; // Create another structure variable struct myStructure s2; // Copy s1 values to s2 s2 = s1; // Print values printf("%d %c %s", s2.myNum, s2.myLetter, s2.myString); return 0; }
13 B 某文本