i am new in c and these are my first codes.
I found a code in my pdf and i did't understand somethings about this code.
This is the code
1) why we use #define ..... (can't we use int uzunluk=10);Code:#include <stdio.h> #include <stdlib.h> #include <time.h> #define UZUNLUK 10 int main() { int i,sayilar [UZUNLUK]; srand(time(NULL)); for(i=0;i<UZUNLUK;i++) { sayilar[i]=rand(); printf("sayi[%d]=%d\n",i,sayilar[i]); system("pause"); } }
2) i can't understand anything from srand(time... line