BachelorWork/appendixes/BC_ZK/demoExamples/rands.c

24 lines
721 B
C
Raw Normal View History

2021-05-27 22:53:37 +00:00
/*
Organization: Technical University of Kosice (TUKE),
Department: Department of Electronics and Multimedia Telecommunications (DEMT/KEMT),
Faculties: Faculty of Electrical Engineering and Informatics (FEI),
Feld of study: Informatics,
Study program: Computer Networks,
School year: 3., Bachelor study, 2020/2021,
Author: Marek Rohac -- MR,
Compiler: Winlibs GCC -- MinGW-W64 x86_64-posix-seh, built by Brecht Sanders, v. 10.2.0,
-- also works with GCC 11.1.0
*/
#include <stdio.h>
#define _CRT_RAND_S
#include <stdlib.h>
int main () {
unsigned int data;
//generating 10*32bit value
for (int i = 0; i < 10 ; i++)
if(rand_s(&data)==0) printf("%u\n",data);
else printf("Rand_s error\n");
return 0;
}