system call

A C code should be like:

#include<stdio.h>

int main(void)

{

system("/bin/bash -c ./test.sh");

//system("/bin/sh -c cat test.sh");

// system("/bin/bash -c hostname");

return 0;

}

and the called script file test.sh is:

#!/bin/bash

echo "Write Your Name ... "

read a

echo "`hostname` Welcomes $a"

vlc

This will run vlc.

Similarly such calls can be done in C programs.