Noeud:Try Again - Again..., Noeud « Next »:, Noeud « Previous »:Fun With Uninitialised Variables, Noeud « Up »:An example debugging session using gdb



Try Again - Again...

Now we have example program ecount4.c which looks like this at the top of main()

     11	int main( int argc, char *argv[] )
     12	{
     13	  char buf[10];
     14	  int count=0, i;
     

We compile it with gcc -g ecount4.c -o ecount4 and get the following result:

     bash$ ecount4 example
     There are 2 'e's in 'example'.