title: Skipping lines of code in c
body: <p>I did it using disassemble main in gdb i.e I used dissassemble main in gdb to determine the address of the next line and that's how I skipped to the desired line. Is there a way in which we can determine the address of next line w/o using disassemble main . i.e in c directly.  Also if there are any other methods please mention.</p>
  
  <pre><code> #include&lt;stdio.h&gt;
  
  fun()
  {
    int i,*j;
  
    j=&amp;i;
  
    j++;
    j++;
    j++;
  
    *j=*j+13; //to skip first printf +13
  
  
    *j=*j+21; //to skip first and second printf +21 ie. 21 + 13
  
    //*j=*j+13; //to skip first,second,third printf +13 ie. 21 + 13 + 13
  }
  
  main()
  {
    int a;
    a=5;
  
    fun();
    printf("hello1");
    printf("%d\n",a);
    printf("hello2");
  
  }
  </code></pre>