System function in C

System function in C – Used to run shell commands inside a C program.
 /*:) system :) have fun */  
 // header files  
 #include<unistd.h>  
 #include<stdio.h>  
 #include<stdlib.h>  
 //main func  
 int main(int argc ,char *argv[])  
 {  
  printf("running ps with system() function\n");  
  system("ps -ax &");  
  printf("done");  
  return 0;   
 }  

Comments

Popular posts from this blog

Generating 16k ROM using Xilinx IP COREGEN and simulating it in modelsim

Setting up atalanta ATPG to work on Linux

Sparse matrix - 3 tuple representation