Write a C program Gen.c that generates a ordered sequence
of 20 random numbers within a range of 1000 to 9999. The
program is invoked by a command line
% gen datfile1
In the above line, gen is the executable, datfile1 is the argument to the execution of gen. It specifies the name of the output file for the 20 random numbers.
To make Gen.c possible, your main() program should accept arguments like
void main (int argc, char *argv)
char *fname = argv;
fp = fopen(fname,"w");
Recently Asked Questions
- Which of the staments are true: (a) Every CMA-secure MAC is CCAsecure; (b) Every CPA-secure SES is CMA-secure; (c) Every CCA-secure SES is CPA-secure. Explain.
- In the 3-panel diagram , above , is the US an exporter or an importer ? importer
- Which of the following are short - term financial instruments ? 53 )