解析:需要编写一个C语言程序,用于查找学生姓名中带有“超”或者年龄小于18岁的同学。 代码如下: ```c #include <stdio.h> #include <string.h> typedef struct { char name[20]; int age; } Student; int main() { Student students[] = { {"张三", 20}, {"李四", 17}, {"王五超", 19}, {"赵六", 16}, {"孙七超", 15} }; int n = sizeof(students) / sizeof(Student); printf("符合条件的同学有: "); for (int i = 0; i < n; i++) { if (strstr(students[i].name, "超") != NULL || students[i].age < 18) { printf("%s %d岁 ", students[i].name, students[i].age); } } return 0; } ``` 这段代码定义了一个学生结构体,包含姓名和年龄两个字段。然后创建了一个学生数组,包含了5个学生的信息。接着遍历这个数组,判断每个学生的姓名是否包含“超”或者年龄是否小于18岁,如果满足条件则输出该学生的姓名和年龄。 [2024-06-12 15:02:37 | AI写代码神器 | 319点数解答]