#include<stdio.h> #include<stdlib.h> #define MAX 1024 main() { FILE *fp; int p,i; char path[MAX]="ps -eo pid,pcpu,pmem"; //popen...
ohh i got that.. but sprintf is not working as in that is the thing which is showing errors.
i'm getting the following errors for the line with sprintf over.c:11: warning: passing arg 2 of `sprintf' makes pointer from integer without...
hii i got that in shell scripting... how do i do that in c code?? the c code which i have given has to work in linux. i want to modify...
this is the c code to get the pids and %cpu n %mem in linux/unix FILE *fp; char pid[MAX]="ps -eo pid,pcpu,pmem"; fp=popen(pid,"r"); while...
Separate names with a comma.