C语言随机点名程序

#include "stdio.h"
#include "stdlib.h"
#include "time.h"
#include "windows.h"

void main(){
  srand(time(NULL));
  int num = rand()%3;
  char name[3][7] = {"张三","李四","王五"};
  printf("%s ",name[num]);
  system("pause");
}

原文地址:https://www.cnblogs.com/laoluoits/p/8135330.html