C Random Number Generation (pure C code, no libraries or functions)

后端 未结 7 1208
时光取名叫无心
时光取名叫无心 2021-01-21 03:11

I need to generate some random numbers in C for testing and debugging the system. The system is a custom hardware (SoC) with a limited set of functions so I can only use basic m

7条回答
  •  滥情空心
    2021-01-21 03:40

    A linear congruential generator would be simple to implement. A nice implementation in pure C is available here.

提交回复
热议问题