File tree Expand file tree Collapse file tree 3 files changed +17
-17
lines changed Expand file tree Collapse file tree 3 files changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,13 @@ import (
99func main () {
1010 name := flag .String ("name" , "world" , "specify the name you want to say hi" )
1111 flag .Parse ()
12+ fmt .Printf ("%d\n " , * name )
1213 fmt .Println ("os args is:" , os .Args )
1314 fmt .Println ("input parameter is:" , * name )
14- fmt .Printf ("Hello %s from Go\n " , * name )
15+ fullString := fmt .Sprintf ("Hello %s from Go\n " , * name )
16+ fmt .Println (fullString )
17+ for i , c := range fullString {
18+ fmt .Printf ("%d:%s " , i , string (c ))
19+ }
20+
1521}
Original file line number Diff line number Diff line change 1+ #include <stdlib.h>
2+ #include <stdio.h>
3+ #include <string.h>
4+
5+ #define BLOCK_SIZE (100*1024*1024)
6+ char * allocMemory () {
7+ char * out = (char * )malloc (BLOCK_SIZE );
8+ memset (out , 'A' , BLOCK_SIZE );
9+ return out ;
10+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments