top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Changing the name of processing on execution?

+4 votes
248 views

I want to try a program which changes its own name when run? Can someone help me by providing C/C++ code for such stuff if it is possible.

posted Nov 13, 2013 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button
you mean PID ?

Similar Questions
+7 votes
#include<stdio.h>

int &fun()
{
   static int x;
   return x;
}   

int main()
{
   fun() = 10;
   printf(" %d ", fun());

   return 0;
}

It is fine with c++ compiler while giving error with c compiler.

+4 votes

Lets assume I have a system with RAM of 1GB. and virtual memory is 500MB. That brings to 1.5GB i.e. 1500 MBytes.

I have read somewhere that when I process is created stack of 8MB is associated to that process. So, assuming that any of the process is not allocating any dynamic memory or anything, then does it mean that, Maximum number of process that i can create is 1500/8 and i.e. 187 Process.

Please clarify my understanding,

+2 votes

A char can not be a +ve or -ve. last bit is signed bit in accumulator.but not useful for CHAR Whats the purpose? of doing it.

...