Paste-bin.xyz
Archive
Sign In
Login
Register
Username
Current Password
Keep me signed in.
Username
Full Name
Email
New Password
C
25
pid getpid
Guest on 24th January 2023 02:11:13 PM
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int
main
(
void
)
{
int
i
;
printf
(
"pid %d
\n
"
,
getpid
(
)
)
;
i
=
0
;
while
(
1
)
{
printf
(
"%d
\n
"
,
i
)
;
i
++;
sleep
(
1
)
;
}
return
(
0
)
;
}
Raw Paste
#include <stdio.h> #include <sys/types.h> #include <unistd.h> int main(void) { int i; printf("pid %d\n", getpid()); i = 0; while (1) { printf("%d\n", i); i++; sleep(1); } return (0); }
Login
or
Register
to edit or fork this paste. It's free.
">