int i[5]; i[0] = i[1] = 1; i[2] = 2; i[i[2] + 1] = i[2] + 2; i[i[2] + i[2]] = i[3] + i[2];
int i, a[10]; // clear or copy all values for ( i = 0; i < 10; i++ ) { a[i] = 0; or a[i] = x[i]; }
unsigned short int a[10] = {1, 2, 3, 4, 5, 6, 0, 0, 0, 0}; unsigned short int a[10] = {1, 2, 3, 4, 5, 6}; unsigned short int a[] = {1, 2, 3, 4, 5, 6, 0, 0, 0, 0}; unsigned short int a[] = {[0]=1, [1]=2, [2]=3, [3]=4, [4]=5, [5]=6, [9]=0};
int i, j; float a[3][10] = { {14.2, 1, 0, 9.4}, {0, 144, 7, 2.5}, {2, 3, 109, 42.0} };
for (j = 0; j < 10; j = j + 1) printf("\t%d:", j); printf("\n"); for (i = 0; i < 3; i = i + 1) { printf("%d:", i); for (j = 0; j < 10; j = j + 1) printf("\t%f", a[i][j]); printf("\n"); }
char hello[] = {'h', 'e', 'l', 'l', 'o', '!'};
\n a "newline" character (linefeed, ctrl-j) \b a backspace \r a carriage return (without a line feed, ctrl-m) \' a single quote (e.g., in a character constant) \" a double quote (e.g., in a string constant) \\ a single backslash
By default, it only shows the processes associated with the current terminal.
cat airweb-access_log airweb-access_log.2005Jan* | grep -v airweb | cut -d' ' -f11 | sort | uniq -c | sort -nr | moretakes web server logs with entries such as:
192.114.107.4 - - [23/Jan/2005:09:20:10 -0500] "GET / HTTP/1.1" 200 3515 "http://www2005.org/tutorials/accept.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705)"and generates reports like:
1410 "-" 24 "http://www.cse.lehigh.edu/~brian/" 21 "http://www2005.org/tutorials/" 18 "http://timconverse.com/blog/" 17 "http://www2005.org/tutorials/workshops.html" 16 "http://nike.psu.edu/dbevents/" 8 "http://www.kdnuggets.com/news/2004/n24/28i.html" 8 "http://blog.searchenginewatch.com/blog/050121-124259"